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:
param([string]$framework = "testFramework", [string]$args = "framework arguments needed"])
& $testFramework $args
switch ($LastExitCode){0 { exit 0 }1 { exit $LastExitCode }2 { exit 40 }10 { exit 43 }11 { exit 44 }12 { exit 46 }13 { exit 46 }default { exit 42 }}
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
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.
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.
Comments
Paul Slauenwhite
FORUM MODERATOR / JAZZ DEVELOPER Jan 09 '14, 7:58 a.m.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?
Linda Gray
Jan 09 '14, 12:38 p.m.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.