Output binding in an ontology - semantics

I am trying to complete the following ontology using Protege OWL-S Editor:
At the end of the if-else branch (where the branch merges), I would like to use a variable (like an output variable) so that I could use it to process with further Performs. I am unable to use the output of the branch since protege only allows me to choose either TheParentPerforms or the first st:subtractTenProcess under Start block.
How can I create a variable to use it for the following process?

Related

Specify namespace/class in VS2019 Test Explorer while using CTest/CMake

I'm using CMake + VS2019. In my test definition I have something like:
add_test(NAME "common/base64" COMMAND my_unit_test "common/base64")
VS2019 displays this like:
In project I have hundreds of tests and it is very inconvenient to search through unclear randomly generated names, expanding each items. So my questions:
How can I specify recognizable test name (instead of EBF.Tests.52488745200006951440) ?
How to specify namespace / class?
Also I can see Vs2019 Test Explorer can group by "Traits" - may be I can specify it over this feature?
It seems that the "EBF.Tests" prefix is the "project name".
You can disable the test prefix or set a new one by altering the TEST_PREFIX setting in your test autodiscovery method or the test naming itself.
For CTest, by altering the test naming:
# use [namespace].[class].[testname] naming
add_test("lib.namespace.Tests.SomeTest" test_exe)
For Catch2, by altering the test name prefixing by changing TEST_PREFIX in the auto-discovery method:
catch_discover_tests(
TagTestsTarget
TEST_SPEC "[tag]" # select tests by tag name
TEST_PREFIX "lib.namespace.Tests." # last dot required !
)
Fast Solution:
Set the Group By option in the Test Explorer to visualize by Class.
Then name each test in your CMake files as: mytestname.mytestname
As an example: add_test(NAME mytest.mytest COMMAND mytest)
(Not a perfect solution but it works well enough.)
More details:
When naming tests for the Team Explorer, if there is one dot between the name, will be interpreted as class name then function name. If there are two dots it will be interpreted as namespace, class, function. Any more dots are appended in the function string.
You could also display on the Team Explorer by namespace and then use these naming features to group your tests in at most two levels of hierarchy.
As example you could name all the tests related to a given feature with the same class or namespace and they will display nicely in the same set in the Team Explorer window.

How do I write a robust structural search template to report Mockito times(1)/Times(1) passed to verify in IntelliJ IDEA?

In my project Mockito.times(1) is often used when verifying mocks:
verify(mock, times(1)).call();
This is redundant since Mockito uses implicit times(1) for verify(Object), thus the following code does exactly what the code above does:
verify(mock).call();
So I'm going to write an a structural search drive inspection to report such cases (let's say, named something like Mockito.times(1) is redundant). As I'm not an expert in IntelliJ IDEA structural search, my first attempt was:
Mockito.times(1)
Obviously, this is not a good seach template because it ignores the call-site. Let's say, I find it useful for the following code and I would not like the inspection to trigger:
VerificationMode times = Mockito.times(1);
// ^ unwanted "Mockito.times(1) is redundant"
So now I would like to define the context where I would like the inspection to trigger. Now the inspection search template becomes:
Mockito.verify($mock$, Mockito.times(1))
Great! Now code like verify(mock, times(1)).call() is reported fine (if times was statically imported from org.mockito.Mockito). But there is also one thing. Mockito.times actually comes from its VerificationModeFactory class where such verification modes are grouped, so the following line is ignored by the inspection:
verify(mockSupplier, VerificationModeFactory.times(1)).get();
My another attempt to fix this one was something like:
Mockito.verify($mock$, $times$(1))
where:
$mock$ is still a default template variable;
$times$ is a variable with Text/regexp set to times, Whole words only and Value is read are set to true, and Expression type (regexp) is set to (Times|VerificationMode) -- at least this is the way I believed it should work.
Can't make it work. Why is Times also included to the regexp? This is the real implementation of *.times(int), so, ideally, the following line should be reported too:
verify(mockSupplier, new Times(1)).get();
Of course, I could create all three inspection templates, but is it possible to create such a template using single search template and what am I missing when configuring the $times$ variable?
(I'm using IntelliJ IDEA Community Edition 2016.1.1)
Try the following search query:
Mockito.verify($mock$, $Qualifier$.times(1))
With $Qualifier$ text/regexp VerificationModeFactory|Mockito and occurrences count 0,1 (to find it when statically imported also).
To also match new Times(1) you can use the following query:
Mockito.verify($mock$, $times$)
With $times$ text/regexp .*times\s*\(\s*1\s*\) and uncheck the Case sensitive checkbox.

Pentaho Kettle: how to pass variable from transformation to another transformation inside job

I have two transformations in the job.
In the first trasnformation - I get details about the file.
Now I would like to pass this information to the second transformation, I have set variable in the settings parameters of the trasnformation #2 and use Get Variables inside - but the values are not passed.
See attached sample: https://www.hightail.com/download/bXBiV28wMVhLVlZWeHNUQw
LOG_1 - displays file time, however LOG_2 and LOG_3 are not producing any value.
How can I pass variable across transformations and to parent job.
Try checking the box in the second transformation as below image:
Remove all the logs from the Job file you shared.
You may try reading this blog.
Hope this will resolve your issue :)

How work the ordering of parameters in an owl-s perform?

Owl-s ontology describe an programing language for web services (like [bpel]).
What is the way to use the process binding in a perform to tell the ordering of the parameters in an Owl-s Process ?
example:
Considere this call :
myProcess(myFirstParameter, mySecondParameter)
In owl-s we get something like this :
Perform(MyProcess,hasDataFrom(Binding(TheParam(myFirParameter), TheParam(MySecondParameter) )))
What are the axiom(s) to add to the ontology to tell the process that the correct call is
is:
myProcess(myFirstParameter, mySecondParameter)
and not:
myProcess(mySecondParameter, myFirstParameter)
?
The section 5.5 Specifying Data Flow and Parameter Bindings of the w3c submission give very little information about this. And I can't find an example of an non atomic process using more than one parameters or not relying on the WSDL binding. Can someone show me an example of parameters binding that work ?
Context of the question :
WSDL is not an option because the services to perfome can be : human,
rest, kqml ... (and also wsdl but not all).
Right now, my ontology is encoded as java class(one class
per-concept), so I am using an ArrayList for the parameter ordering.
But tomorow I have to export it.

How to use Global Property name in my JSON input request using SoapUI?

I have a SoapUI project which contains around 60 plus services. Each service requires some input which will be changed for every execution. So I have created certain Global Properties and assign some values to that properties.
I have to use these properties values in my SoapUI request ( i.e. JSON Format request ).
If it is groovy script means, I will use like this.
String HTiC_Username = com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.globalProperties['HTiC_Username'].value;
But, how to get the value of the Global Property in the request?
Hope you understand my question. Please provide proper guidance.
Thanks
To dynamically "expand" (i.e. substitute) the value of a property into a test step, the following syntax is used: ${#scope#propertyName}
...where 'scope' refers to the level at which the property has been defined (e.g. Global, Project, TestSuite, TestCase).
So to expand a property named username defined as a Global property, for example, the following code can be used directly within a Request Test Step (e.g within a JSON body, or header value, etc):
${#Global#username}
To access the same property value within a Groovy Test Step, you can use the following syntax:
context.expand('${#scope#propertyName}')
...as in the following example:
context.expand('${#Global#username}')
What we did was the following:
created a test data file to store all the specific input data for the different services (testdata.properties)
Example content of testdata.properties:
Billing_customerID=1234567
OtherService_paymentid=12121212
....
create a SoupUi global parameter (File/Preferences/Global properties): testdata_filepath=C:\...
For specific services we added a Properties test step. You can specify the "Load from" field to our new global parameter: ${#Global#testdata_filepath} Now you can use the Load button to load parameters.
Finally you can reference the parameter in your xml in the following format: ${Properties#Billing_customerID}
Example content of a service with parameter:
...
<BillingCustomerIdentification>
<BillingCustomerID>${#Properties#Billing_customerID}</BillingCustomerID>
</BillingCustomerIdentification>
...
To set up your projects in this manner also helps to automate service tests eg. using Hudson (see my previous SO answer).
If it is too heavy and automation is not a target, you can simply use ${#Global#someinputvariable} format in your xml ;-)