How to execute selenium scripts from ALM test lab.
Question ID: 107399
0
0

We are trying to connect Selenium Robot Framework(Python) to execute test cases from QC/ALM. We are using PyCharm IDE for developing the selenium robot framework automation scripts. How can we connect these python/selenium scripts to HP ALM test lab to execute the scripts?

Marked as spam
Posted by (Questions: 100, Answers: 5)
Asked on January 25, 2017 4:54 pm
952 views
Answers (2)
0
Private answer

Here is how I would do it:

A prerequisite for below would be to have a batch file in windows that would kick off your python test, for example I created a batch file with the following contents to run my selenium test:

cd..
cd..
cd C:PSelenium
python test.py

Once you have this, the easiest way to run it in ALM would be to create a Vapi-XP script in ALM, I was able to create one and selected VBScript as the script language for the Vapi-XP test, then you can then click ''Finish''

Once you have created the Vapi-XP test you would then go to the ''Test Script'' section of the test and find the section that says ' TODO: put your code here you would replace that with your own code that would kick off your python test. In my environment I created the batch file above that would run my python/selenium script then I put the following code in the Vapi-XP script to run the batch file:

mycommand = ''C:PSeleniumRunVapi.bat''
TDOutput.Print ''Starting '' & mycommand
result=run(mycommand,0,true)
TDOutput.Print ''Test ended with '' & result

This command runs the batch file that I created at the beginning which in turn runs the selenium/python script. There is only one downside to this, as long as the batch file is able to run it will report a pass even if the selenium script did not run properly or encountered an error, it would be up to you to add further logic that would have checkpoints, etc, you could even update the results to the test using the OTA api or Rest API.

Marked as spam
Posted by (Questions: 0, Answers: 364)
Answered on January 25, 2017 4:56 pm
0
Private answer

@Josh_Yates I have selenium script written in Java using TestNG.
Now how to execute selenium scripts from ALM test lab with Java ?

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on April 4, 2018 7:19 am
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top