Creating Multiple Test Case Execution Records with REST API for a single Test Case
The RQM interface can generate multiple test case execution records for a single test case given a preset iteration and the presence of multiple test environments.
Given a new iteration and knowledge of the available test environments in an RQM project, how could one PUT multiple test case execution records into a single test case with the RqmApi?
I currently crash my JazzClient application when attempting to create multiple test case execution records for a single test case, and I cannot set the test environment or iteration (something I would like to be able to do).
Cheers.
|
4 answers
Stephane Leroy (1.4k●1●4●9)
| answered Oct 02 '14, 5:47 a.m.
JAZZ DEVELOPER edited Oct 03 '14, 3:31 a.m.
Hi Matthew,
I guess you would need to iterate in your client app. But since you mention a crash, I'd advise you to reproduce with an attempt to create the smallest amount of TCERs. Ideally, you would want to reduce this number to 1 only. From there, you could debug / check whether your POST/PUT URL, headers and the Test Phase, Test Env, Test Plan that you feed your new TCERs are really valid. In case of incorrect configuration, the RQM would normally provide you some useful message. References: - the core one is RQM Reportable REST API: https://jazz.net/wiki/bin/view/Main/RqmApi - for examples of URLs, you could refer to the following blog post: http://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/ Regards, Stéphane |
Hi Stephane,
We have defined a test case execution record, for any test case, as having a unique test environment and iteration (as does RQM). Many test environments and iterations exist for many test cases. Generating sets of test case execution records, for a given test case in a given test plan, can be do so manually in the RQM interface (Test Plan -> Test Cases -> Action Menu -> Generate Execution Record -> then chose iteration & Generate Test Environments... bingo, you now have multiple TCERs for a single test case).
Our automation effort requires us to be able to generate multiple TCERs for a single test case on the go with iteration and test environment settable (not possible with the RQM Reportable REST API).
Use case example; a result has been made available and an existing test case does not have a matching TCER with correct iteration and test environment. Since there are many results and many test cases, it would not be feasible to stop/flag the uploading process, notify a human to go add the new iteration or test environment in the RQM interface (admin privileges needed to do this) and then, for each test case within a test plan, go and generate all possible combinations of iteration and test environment. In fact, there is no guarantee that every test case will be performed in every test environment for every iteration, so generating TCERs from the RQM interface in every combination of iteration and test environment before a result can be added could yield TCERs that never have a result uploaded.
Again there will be many test cases, test environments, and iterations so many TCERs will need to be generated as results are made available. We are not using RQM to generate test coverage for us (I suspect that is why RQM can generate TCERs for combinations of iterations and test environments) since an internal tool does this for us already. Instead, RQM is our tool for reporting what happened so we need to be able to specify test environment and iteration while creating a TCER, for a single test case, just before we create a result for said TCER.
Feel free to ask for any clarification(s),
-Matt
Comments
Matthew Brazeau
commented Oct 03 '14, 10:46 a.m.
In this use case, there exists one test plan. Hi Matthew,
Matthew Brazeau
commented Oct 06 '14, 12:40 p.m.
Hey Stephane,
That plan makes sense and is what we wanted to do, but it is not possible to feed RQM multiple TCERs for a single test case. This is because each TCER for a single test case must have a unique test environment and iteration, but these are not configurable over the RQM Reportable REST API. Do you have a solution?
-Matt
Matthew Brazeau
commented Oct 06 '14, 12:45 p.m.
To be clear, try to PUT two TCERs into a single test case with whichever configurations you want over the RQM Reportable REST API. I have observed the second TCER to be rejected since RQM views it as a redundant artifact (again, since one cannot specify test environment and iteration during the PUT). Perhaps I have overlook something? If you PUT the exact same TCERs definition: yes, indeed it will be rejected (nominal behavior). But if you change whatever part of n-uple (test Plan, test phase, test environment, etc.) so that's it's new to RQM, it should pass.
|
We are almost on the same page;
Is it possible to set Test Environment and Iteration for a Test Case Execution Record, in general, from the Rqm Reportable REST API via a PUT request when creating a Test Case Execution Record? (Note that a GET request on a Test Case Execution Record does not report Test Environment or Iteration).
I am trying to add multiple TCER's to a single test case with constant test plan and test phase attributes. Test Environment and Iteration are the only attributes that will be different between the single test cases multiple TCER's (besides their respective external ID's)
Comments 1
Hi Matthew,
Thanks Stephane. I was not aware that iteration is configurable by "Test Phase". Can you point me to where this is documented in Jazz for the RqmAPi?
Matthew Brazeau
commented Oct 07 '14, 1:21 p.m.
Thanks Stephane. I was not aware that iteration is configurable by "Test Phase". Can you point me to where this is documented in Jazz for the RqmAPi? Matthew, for clarifications on Test Phases and Iterations, I suggest you check the references provided by Don in this previous question:
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.