How to determine order of TestSet TestCases with Rally RestApi Request - rally

I am trying to retrieve/determine the order of TestCases within a Rally TestSet using the following:
Request requestTC = new Request(test_set["TestCases"]);
findTCMatchQueryResult = m.myRestApi.Query(requestTC);
However, regardless of whether or not I specify an "Order" of "DragAndDropRank" or do not specify an "Order", I can never retrieve the order of TestSet TestCases that I see in Rally.
For example,
In the Rally website, I have a TestSet with TestCases "X", "Y", and "Z" in that order, but with the above code, I can never seem to get the test cases in that order.
How can I find the order that is shown in the Rally website?
Thanks in advance!

"Rank" of things is specified by the DragAndDropRank field. The thing to remember is that DragAndDropRank is specific to the context. For example, if I move TestCases about under the test set in the Iteration Status page, the DragAndDropRank is set for that. If I move TestCases around in the Quality->TestCases page, this is a different context and therefore the "rank" is different. However, they should remain consistent in that if you move TC6 above TC5 in the TestCases page (against other TestCases), then that should be reflected in the Iteration Status page where TC6 and TC5 are under TS2.
The DragAndDropRank field on artefacts is not a number, it is a long hash value encoded with the info needed for both cases.

Related

I am facing issue in jmeter

When I record and run the test in login transaction one request is failed.i check that request I found in post data session id keep on chenging.i did correlation for that Id .after I want to replace the variable name insted of that Id.but it not replace. Because that Id is not there any subsequent requests and any parameter value undre the requests.how I need to handle that Id how to replace it... please help me for the above issue
Note: I search that ID in view results tree it showing that Id passing in 3subsequent requests
Make sure that you really "did correlation for that Id", i.e.
Double check that the variable has the anticipated value using Debug Sampler and View Results Tree listener combination
Make sure that the placement of the Post-Processor performing the correlation is correct as according to JMeter Scoping Rules the Post-Processor is applied to:
One Samples only if it's placed as a child of this sampler
All the Samplers which reside at the same level (or lower) with the Post-Processor
so it might be the case you're overwriting the variable with the empty value somewhere else.

how to give a generic value/id in HTTP request (path) in jmeter?

[The product id changes very time when the page refreshes so can you tell me how can one give a generic id/name which automatically picks the assigned id when the page is loaded.
Example
Currently what is happening:
In Path: /EAPPFileUpload/UploadFiles?currentFolder=ARA&productID=1234
What is required
In Path /EAPPFileUpload/UploadFiles?currentFolder=ARA&productID=variable
where variable shall possess the id in it.]1
My expectation is that this "product id" doesn't come out of nowhere, most likely it exists somewhere in previous response, either in body, or in headers or in URL.
So you need to extract the value from the previous response with i.e. Regular Expression Extractor, save it into a JMeter Variable and replace hard-coded (recorded?) value of 1234 with the aforementioned JMeter Variable.
The whole process is known as correlation and has been discussed hundreds of times already.

calling RankToPosition() and _onMoveToPositionClicked

I have a situation where i'd like to enter a "3" into a textbox on a user story grid, call something like RankToPosition(3) to move that user story row to position 3 in the current rank. Within the same grid, the idea is to have a textbox on each row, so the row beneath may have a 4 in there, and when i click SUBMIT, the entire table would be processed by using the numbers in the row textbox and calling RankToPosition(#). This is like the Netflix queue. There have been similar questions on here, but my thought is to just call the underlying method alluded to here as "_onMoveToPositionClicked":
https://help.rallydev.com/apps/2.0rc3/doc/source/MoveToPositionMenuItem.html#Rally-ui-menu-item-MoveToPositionMenuItem-cfg-rankRecordHelper
If i could iterate through the table grid, store initial rank values (i realize they're not just integers), and pick the new text values up, run code to call the _onMoveToPositionClicked beneath the scenes, it may accomplish a bulk rank grid for when users have 200+ items to manage, for instance.
Any insight you have for just calling this in custom code would be helpful. Any solution for representing this functionality would be appreciated. I am currently using Rally 2.0rc3.
Thank you for your time
Is it possible to upgrade to a newer version of the App SDK? 2.0rc3 is a very old pre-release. The latest is 2.1: https://help.rallydev.com/apps/2.1/doc/
In any case, the way ranking is performed is relative to another object via the rankAbove or rankBelow parameters. So given the record you want to rerank:
record.save({
params: {
rankAbove: '/hierarchicalrequirement/12345'
}
});

Rally API 2 how to access the PlanEstimate of an Iteration

I can see and get hold of the 'PlannedVelocity' field which is a user entered field, how do I grab the 'Plan Estimate' details which I can see when editing an iteration. This looks like a calculated field that totals the number of actually contained stories in an iteration.
I have tried the obvious 'PlanEstimate' but is returning nulls, is this actually a field that is available to the API?
Yes, it is only visible in the UI, and shows rollup value of PlanEstimates of artifacts scheduled for the iteration. WS API object model does not have this field. Iteration object in WS API has the following attributes:
EndDate,Name,Notes,PlannedVelocity,Project,RevisionHistory,StartDate,Theme,UserIterationCapacities

using Selenium: how to use output from one test as input to another test

I'm a Selenium n00b... it's clear how easy it is to run a test and verify a particular response, but how can I take a value from one response and use it in the next test?
an example might be a contact creation form...
type in name/email and click submit
response arrives with new ContactID
grab the ContactID that was returned and put it into "get" textbox and click "submit"
response arrives with contact details
verfy the name/email match the first set
how might I go about doing this in Selenium?
And now something completely different:
Now I understand when you say "test", you mean a single assertion within one test case. So you want to use a value returned from a request as input for another request in the same test case.
Assuming you use selenium ide: To do this, use one of the "store..." commands in selenium ide and store the value into a variable. The contactID can be found using a matching selector with the storeText command. For example:
command: storeText
target: selector for element containing contactId
value: contactId
Then, use variable substitution and the type command to insert that text somewhere else.
command: type
target: selector for target input box
value: ${contactId}
Hope this helps :)
(This answer is still correct I think if you interpret "test" as "test case". For another, totally different answer see below.)
You don't do this. Each test should be independent from all other tests. For your second test, just repeat the steps in the first test. This way, you can reproduce test success and failures in a reliable way.
If you have many tests which all start from a certain application state which requires many steps to reach, just write a private helper method to reach that state.
The alternative: All steps you describe can be put into a single test. There is no reason not to have several asserts in one test.