I am using While Controller with Condition:
${_javaScript("${DONE}" ! = "Resolved and Downloaded";)}
where initially DONE="Not Assigned yet".
After few iterations DONE changes and has value Resolved and Downloaded (which I check in Debug Sampler) but loop continues and doesn't quit.
What did I do wrong,What should I do to make it work?
Check syntax of your condition expression first: should be double __ before function name and , instead of ; after condition in function's params list:
${__javaScript("${DONE}"!="Resolved and Downloaded",)}
This can break your test case.
As well you can look into jmeter.log for possible issue details.
${__javaScript("${DONE}"!="Resolved and Downloaded")}
You can try the following using while controller:
${__javaScript(${DONE} !="Resolved and Downloaded")}
You may use if controller.Keeping the if controller as a child of runtime controller.Specify max time in runtime controller.
Under If controller specify the following:
"${DONE}" !="Resolved and Downloaded"
Related
Dear Stackoverflowers,
this is my first post, so I try to do everything correct.
In the error handler of an OSB component, I need to assign a value from the existing $originalHeader to another variable to reuse it, without entering the value as text.
In an assign-action, the expression $originalHeader/privateMetaAttributesHeader/LoggingCategory
for variable originalLoggingCategory does return the below:
Debugging_VariablesScreen
I do not understand why the value of LoggingCategory is not assigned to variable originalLoggingCategory. Please help me out with this.
Content of $originalHeader:
<soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><v1:privateMetaAttributesHeader xmlns:v1="http://www.example.org/scintilla/meta/v1"><SwingMonitoring>...</SwingMonitoring><LoggingCategory>com.schenker.scintilla.AirOcean.WWTAN.LoadPlanInstructionService.v1</LoggingCategory></v1:privateMetaAttributesHeader></soapenv:Header>
Thanks in advance.
Patrick
There is a difference between <privateMetaAttributesHeader> and <v1:privateMetaAttributesHeader>, which OSB rightly respects.
for instance
$originalHeader/privateMetaAttributesHeader/LoggingCategory may be null
$originalHeader/v1:privateMetaAttributesHeader/v1:LoggingCategory will probably return what you want (try selecting just the header at first, then work your way down to the logging category, just in case LoggingCategory isn't in the v1 namespace)
You can define what namespace 'v1' is in the OSB Proxy Stage, or if you don't know, you can use $originalHeader/*:privateMetaAttributesHeader/*:LoggingCategory but that's not recommended.
Is it possible to add to a CustomMboSet in Maximo using scripting? I am writing a custom application using a custom object called TIMESHEET. As part of the application I am writing a (Jython) script that needs to dynamically build up an MboSet (a set of TIMESHEETs). The code retrieves an existing CustomMboSet and attempts to add elements to it. It works when using an out of box MboSet, but when I try to run the same code on a custom MboSet it does not seem to work. No error is thrown, but code below the offending line is not run.
In other words, this works (LABTRANS is an out of box MBO):
myMboSet = mbo.getMboSet("LABTRANS")
newMbo = myMboSet.add()
# Set attributes on newMbo, everything is happy
But this does not (TIMESHEET is a custom MBO):
myMboSet = mbo.getMboSet("TIMESHEET")
newMbo = myMboSet.add()
# Code does not execute after the above line
Anyone have any insight as to why I am seeing this behavior? Does the Maximo scripting framework simply not support the dynamic building up of CustomMboSets? Any help is appreciated. Thanks.
You need to make sure that the relationship exists between the Current MBO and the Custom MBO in the database configuration otherwise it will not work.
Alternatively you can use the following code to create an new mboSet on the fly:
timeSheetMboSet = mxServer.getMboSet("TIMESHEET", userInfo)
mbo.getMboSet(RELATIONSHIPNAME).
LABTRANS and TIMESHEET must be the relationship names to the object in auto script.
If you want to get/add records in any object, use
mxServer.getMboSet(OBJECTNAME, userInfo)
A bit more explanation. You can create your own custom relationship from within your automation script. The trick is to make sure it's not already existing. That's why I use a dollar sign for mine.
variable = mbo.getMboSet(tempRelationshipName,Object,where clause)
previousPhaseSet = mbo.getMboSet("$wophasetranstemp1", "exitdate is null")
Am trying to validate some data in the view using Robotium.
I have written the below code for the same:
NegativeExpected=false;
solo.clickOnButton(0);
solo.sleep(10000);
actual= solo.searchText("Jan-12");
actual= solo.searchText("Feb-12");
actual= solo.searchText("Jul-12");
actual= solo.searchText("Aug-12");
assertEquals(NegativeExpected,actual);
Here what I am trying to do is to check the presence of the list of data and if present the test case has to fail. ie., AssertFalse operation.
But even when the values are present, the test case is never failing and is passing. Am really not able to understand why its happening so. Am really at a fix.
Please help me out.
Thanks.
Use assertEquals(NegativeExpected,actual);after every
actual= solo.searchText("Jan-12");("Feb-12")..
because in your present code, it is checking the assert condition only for the last
actual= solo.searchText("Jan-12");
or you can define them as actual1, actual2...and use and/or operator among them in your final assertEquals(..)according to your requirement.
and if negative expected is noy working then try !actualas
assertEquals(Expected,!actual);
Another way to do this id:
AssertFalse(solo.searchText("Jan-12"));
You could use this for each one.
actual &= solo.search("xxx");
so that you won't lost your total actual value.
I'm using the Login snippet in MODx Revo and I'm trying to put the template directly in the loginTpl and logoutTpl properties but nothing is being output. Below is my code. What am I doing wrong?
Thanks in advance!
[[!Login? &tplType=`inline` &loginTpl=`<span>Log In</span>` &logoutTpl=`<span>[[+username]]</span>`]]
The placeholders are evaluated before snippet is processed, i.e. before the #INLINE tpl is ever used.
Use chunks;
Or non-cacheable placeholder (has not been tested):
[[!Login? &tplType=`inline` &loginTpl=`<span>Log In</span>` &logoutTpl=`<span>[[!+username]]</span>`]]
It fully works, check to see if login component is installed (it is not installed by default).
I am using a route like this
match "/v1/:method" => "v1#index"
My intention here is capture the name of the api method and then send the request to that method inside the controller.
def index
self.send params[:method], params
end
I figured this would send the other parameters as an argument to the method, but it didn't work. So my question is how can I pass the non-method parameters in a query string?
#query_parameters does exactly what you want:
request.query_parameters
It's also the most efficient solution since it doesn't construct a new hash, like the other ones do.
Stolen from the work of a colleague. I find this a slightly more robust solution, since it will work even if there are changes to the path parameters:
params.except(*request.path_parameters.keys)
I sort of solved this problem by doing this:
params.except("method","action","controller")