QTP does not work with the latest version of our software as we moved from a standalone application to a web application. QTP cannot see the DOM objects, so we're investigating alternatives. Ranorex is looking like a very powerful solution, but I'm not able to wrap my head around how the QC connection is going to work within the test suite. My needs might be slightly different than others, where a "Test Step" in Ranorex will need to map back to QC where we have our requirements. I'm guessing a grouped module would be necessary to create a "Test Step". See attached image for an example.
I copied the code posted by sdaly, converted it to C#, and added a new coded module to my project. I then added code to the [Program.cs] file to create the new QCBridge object and attempt the connection to QC (message box appears stating pass/fail of the connection). So far, this appears to be working correctly.
1) Is this the correct way to set up the qcb object and connect to QC?
2) Will my test cases have access to this qcb object, or do I need to create a global parameter, which would get set to the qcb object I create?
Where do I go from here? The QCBridge object has methods for starting and stopping tests.
1) Would I put the calls to this in coded modules added to the [SETUP] and [TEARDOWN] for each and every test case?
2) How could I accomplish adding the result to the correct Quality Center Run? Would I need to create a dialog like QTP has where the tester would select the correct Run location (see attached example)?
How to implement QC/ALM connection
How to implement QC/ALM connection
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to implement QC/ALM connection
Hi livelyjay,
I am not exactly sure if this is a Ranorex issue, but have you already read the section"Running Ranorex Automated Tests with HP Quality Center" on our website?
Maybe this can help solving the issue.
Regards,
Bernhard
I am not exactly sure if this is a Ranorex issue, but have you already read the section"Running Ranorex Automated Tests with HP Quality Center" on our website?
Maybe this can help solving the issue.
Regards,
Bernhard
Re: How to implement QC/ALM connection
That could work, but it's not ideal for our situation. My company occasionally gets audited by the FDA as we're a medical imaging company. We need pass/fail for specific steps and not just entire test runs because the pass/fail has to trace back to a specific requirement so we can show tracability.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to implement QC/ALM connection
Hello livelyjay,
Unfortunately this is not possible out of the box because QC only gets the state of the whole test suite.
As workaround you could run every test case separately using, for example the command line parameters as described in our user guide in the section "Running Tests via Command Line". Every Test Case should return a separate value.
Regards,
Bernhard
Unfortunately this is not possible out of the box because QC only gets the state of the whole test suite.
As workaround you could run every test case separately using, for example the command line parameters as described in our user guide in the section "Running Tests via Command Line". Every Test Case should return a separate value.
Regards,
Bernhard
Re: How to implement QC/ALM connection
I'm well aware that it's not possible out of the box. I'd have to write code to access the QC API adapter to update the test step status. Here's the code I wrote inside QTP to tie the script to a test run and update each test step. This all worked seamlessly. The missing link for Ranorex would be initiating the test run, as QTP accomplishes this through a "Run Dialog", and if you launch the test from QC it would create the new run automatically.
Function QCBeginReport
If QCUtil.IsConnected Then
Dim currentRun, allSteps, i
Set currentRun = QCUtil.CurrentRun
currentRun.CopyDesignSteps
Set allSteps = currentRun.StepFactory.NewList("")
QCUtil.CurrentRun.Field("RN_DRAFT") = "N"
End If
End Function
Function QCReportEvent(Status, StepName, Actual)
If QCUtil.IsConnected Then
Dim currentRun, allSteps, i
Set currentRun = QCUtil.CurrentRun
Set allSteps = currentRun.StepFactory.NewList("")
For i = 1 to allSteps.Count
If (allSteps.item(i).name = StepName) then
allSteps.item(i).Field("ST_ACTUAL") = Actual
allSteps.item(i).Status = Status
allSteps.item(i).Post
Exit For
End If
Next
End If
End Function
Function QCBeginReport
If QCUtil.IsConnected Then
Dim currentRun, allSteps, i
Set currentRun = QCUtil.CurrentRun
currentRun.CopyDesignSteps
Set allSteps = currentRun.StepFactory.NewList("")
QCUtil.CurrentRun.Field("RN_DRAFT") = "N"
End If
End Function
Function QCReportEvent(Status, StepName, Actual)
If QCUtil.IsConnected Then
Dim currentRun, allSteps, i
Set currentRun = QCUtil.CurrentRun
Set allSteps = currentRun.StepFactory.NewList("")
For i = 1 to allSteps.Count
If (allSteps.item(i).name = StepName) then
allSteps.item(i).Field("ST_ACTUAL") = Actual
allSteps.item(i).Status = Status
allSteps.item(i).Post
Exit For
End If
Next
End If
End Function
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to implement QC/ALM connection
Hi livelyjay,
Thank you for sharing your code. Unfortunately I have no experience with the QC API adapter, so I am afraid that I cannot help solving your issue.
Maybe some other users in this forum are familiar with the QC API adapter and can help.
Regards,
Bernhard
Thank you for sharing your code. Unfortunately I have no experience with the QC API adapter, so I am afraid that I cannot help solving your issue.
Maybe some other users in this forum are familiar with the QC API adapter and can help.
Regards,
Bernhard
Re: How to implement QC/ALM connection
After doing some research on the QC API and updating the VBS code posted by sdaly in another thread, I was able to figure out how to update first the overall test run status. After I accomplished that it was pretty simple to follow what I did in QTP and implement the code needed in Ranorex to update the individual test steps in QC.
The problem I have is inside my test script I hard coded the Test Plan and Test Set for the Quality Center update to work. Is there a way I can launch the test from Quality Center, and send the Test Plan and Test Set paths to Ranorex using arguments (parameters)? I attached a screenshot that shows how I attempted to do this, but it doesn't work and I'm still trying to get familiar with launching Ranorex through QC (it works as shown in the screenshot, but the reports aren't attaching and it's running the entire test suite instead of just the test case I put in the parameters).
The problem I have is inside my test script I hard coded the Test Plan and Test Set for the Quality Center update to work. Is there a way I can launch the test from Quality Center, and send the Test Plan and Test Set paths to Ranorex using arguments (parameters)? I attached a screenshot that shows how I attempted to do this, but it doesn't work and I'm still trying to get familiar with launching Ranorex through QC (it works as shown in the screenshot, but the reports aren't attaching and it's running the entire test suite instead of just the test case I put in the parameters).
You do not have the required permissions to view the files attached to this post.
Re: How to implement QC/ALM connection
Look for running Ranorex test from command line: http://www.ranorex.com/support/user-gui ... html#c4827
There is an option to tun a certain testcase, and also to pass parameters to them. And as I saw, you can set where the report file should be saved.
Hope this helps.
Zoltán
There is an option to tun a certain testcase, and also to pass parameters to them. And as I saw, you can set where the report file should be saved.
Hope this helps.
Zoltán