1

There has been many link and question around this problem but I still have my doubts.

In my project i am using Robot Framework with selenium for automation, things are smooth till here.

Now the next step is to consume the HP ALM Rest API and integrate with my robot framework, so that test cases pass/fail status, screenshot as attachment, defect log is done automatically.

Currently i have no idea how to proceed with this, like from where i can get the API for HP ALM QC and how to work around with this?

Hope you got my doubts.

user3814582
  • 153
  • 2
  • 15
  • Welcome at [so]. It is expected that questions meet certain criteria. These are described in the [ask] page that I strongly suggest you read. In addition we expect a certain level of effort to already have been spent on your part. This is typically done by showing us the code that you're working on and providing us with descriptions of the things you've tried and the results you've observed. In case of larger blocks of code, simplifying it to a [mcve] helps to understand the issue much quicker on our part. – A. Kootstra Feb 01 '18 at 18:47
  • That was no help.. i was expecting if any one point in certain direction on how to proceed on this. I don't want any code. All i want to know, how can i get the API for QC? so i can start working around on this. I am new to this, expected this would be right place to ask this question. – user3814582 Feb 02 '18 at 03:25
  • 1
    This is a forum for help with programming issues and in rare cases for approaches when information is scarce or conflicting. In your case I did do a quick search on Google for Robot Framework and HP ALM and on the first page the results are sufficiently good enough to start with. Do your own analysis and experiment with the options. When you run into issues or you have trouble resolving them then [so] is the right place to sollicit help and you'll see those responses become more constructive. – A. Kootstra Feb 02 '18 at 07:11
  • You could use the API to login, find the test case, change the test case status and upload the files, you don't need a selenium robot. – j.barrio Feb 02 '18 at 07:19

1 Answers1

2

I believe that I understood your question correctly.

You should give a look to QCRI (https://github.com/douville/qcri).

This will enable you to publish the your Robot Framework results directly in QC! You just have to confirm if it works with your ALM version.

Probably you should use a custom robot framework runner, that in the end calls a python script or the QCRI command line prompt that do the import automatically.

runner.sh with calling a python script that uses QCRI API:

#runner.sh  

#runs the robot framework script first
pybot "$@"

#imports the results to QC
python importQC.py 

importQC.py:

import qcri

loc = 'c:/TestResults/output.xml'
parsers = qcri.get_parsers(loc)
results = qcri.parse_results(parsers[0], loc)
conn = qcri.connect('http://localhost:8080/qcbin', 'QA', 'WEBTEST', tester, secret)
qcri.import_results(conn, 'GroupA/SubGroup', results, attach_report=False)

runner.sh that uses the QCRI command line prompt:

#runner.sh  

#runs the robot framework script first
pybot "$@" 

#imports the results to QC    
qcri --url http://localhost:8080/qcbin --domain QA --project WEBTEST --username tester --pasword secret --source c:/TestResults/output.xml --destination GroupA/SubGroup --attach_report True 

In the end you just have to call your RF script using the runner.sh:

sh runner.sh RF-Script.txt

The solutions above are highly automated, but if you want to have more control on what you import to QC you could also use the QCRI GUI.