RQM not detecting powershell output number. How do I get this working?
Hello All,
I am writing a powershell script to automate testing for my team. It has the ability to run different types of test frameworks and interpret the results into RQM result codes, then just returns those codes. RQM, however, is not detecting those codes and instead looks like it is just setting everything > 0 as 'Failed'. Here is my pseudo-code:
Any suggestions to get this working would be great. I followed the tutorial to assign test scripts and grab its output. Unless I missed something, I feel like this may be a bug?!
Thanks!
|
6 answers
Hi Linda,
Are you using the Command Line Adapter to run these scripts from RQM? Thanks, Deepa |
Yes, I am. I have an adapter setup and when I run the Test Case with the test script assigned to it, the tests run as they should. The only issue is the correct output being displayed in RQM.
I have an adapter that is started on my target system.
1. Created Test Script and added my powershell script with the following command parameters:
- Command: PowerShell.exe
- Arguments: "C:\ScriptFolder\MyScript.ps1 -t C:\testDir\Test1.tstest -f MSTest"
2. Created a Test Case that will run this script
3. Once I run the script (locally or remotely), the tests will kick off and after they completed, all RQM reflects is a 0 or 1, I even went in and hacked the exit code to RQM result codes and still always saw a '1' or Failed. I was supposed to see various error codes and did not.
|
Hi Linda,
Please refer to this article to set the exit codes. https://jazz.net/library/article/809#MapCodes Thanks, Deepa |
I am aware of these codes already, they are in my script. If you reference the code I added in my question you would see them. The problem is RQM is not detecting these codes when my scripts exits with them.
Is there any way I can get proper support on this? This would be faster over the phone or with a ticket? This is a blocking issue for a high priority item.
|
Deepa Doraswamy (471●2)
| answered Jan 15 '14, 6:49 a.m.
JAZZ DEVELOPER edited Jan 15 '14, 7:06 a.m.
Hi Linda,
Please raise a PMR. http://www-01.ibm.com/support/docview.wss?uid=swg21507639 Thanks, Deepa |
With a .bat script, the status of the result is set appropriately in RQM. You could try calling the powershell script from a command line script and return the error code from there. In the RQM Script, call the command line script.
Thanks, Deepa |
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.
Comments
Linda, could you explain how you are integrating with RQM? Are you using the RQM REST API? If so, how are you invoking the API?
I created a test script within RQM that runs my powershell script. I am not using any API's since all the testing we are running uses MSTest and Telerik for now. After I get the output from these testing frameworks, which includes various error codes, I exit powershell echoing the equivalent error/pass code to RQM. The appropriate code is displayed within my command prompt and my powershell app.