Automating HPALM Tasks with UFT - vb.net

I am automating an SAP Application using UFT Tool, I have completed my Automation work in UFT and I have placed all my automation Test Scripts in HP ALM Shared Repository under the folder name Test labs and I am executing my Test scripts from HPALM.
I have a plan to automate the task of launching the HPALM and Run the Test automatically from my local machine so that the user need not need to log into the HPALM each time when he runs a Particular scenario.
In order to achieve this I have an idea to create a file on my local machine containing the name of the test cases and when selecting the Test case the script should open the ALM Connection and Run the Test, But I don't find the appropriate way to achieve this since I am a new to HPALM and VB.
Any Ideas are appreciated and thank you in advance.

Well, in Simpler terms you need to automate using OTA.
1 - You will need a file containing all the test cases and a Flag to check which test case to run - This file can be an Excel file.
2 - Write a VBScript to initiate ALM Connection, Read the cases to be executed from an excel file and execute its test scripts.
Read OTA for more details
Check out my answer for How to use 'Export to HP ALM' Addin for Excel using Macro or VbScript
You may be able to find ideas on connecting ALM through VBScript (I have used a macro, you can use a .VBS (Notepad) )
Let me know if you need more help

Related

Download attachments from a test case (UFT One) in ALM when it is run

I created a uft api script (UFT One) and imported it to ALM.
Can you tell me a procedure (C #) that downloads the excel file attached to the test case (to the test instance) every time this is run on ALM?
Thanks in advance!

Automate Selenium Test cases using Windows Service

I have created a test automation solution using selenium webdriver. Now I want to execute them everyday at particular point of time . For this , I want to create a windows service which starts the tests execution without any input from my side. How should I proceed to achieve that.??
Thanks.
write a batch script that keeps on running and triggers your test everyday at particular time. Or a more professional way is to use Jenkins : )
or you can also use Scheduled Tasks a windows feature
For details on Scheduled tasks

Test Automation Framework - Stuck

I am wondering about where to start in building a test framework here.
I create a vb.net application to display the list of projects available. Allow user to select the project, time and date when test needs to get executed.
Once the user decides the time and task, I want my system to schedule a task onto a remote machine where the test execution would happen at the specified time.
I am stuck at point two. any pointers or question is much appreciated.
I use testcomplete for automation.
I want my system to schedule a task onto a remote machine where the test execution would happen at the specified time
There's a Windows Task Scheduler and associated API that supports scheduling tasks at specific times. The API is aimed at C++ programmers.
You could use the Task Scheduler Managed Wrapper available on CodePlex for easy interop with VB.Net.
The task to execute could be copied to a network drive so that it is accessible from the remote machine.
For point 2 you'll have to call TestComplete from the command line as per these instructions:
http://support.smartbear.com/viewarticle/55587/
You can also call TestExecute from the command line, it's a cut down version of Test Complete that will run your tests. Your license may or may not include that.
Did you also consider taking a look at Jenkins for scheduling your test runs?

Windows Task Scheduler running an Excel VBA script

I have a VBA script in Excel that I wish to run every morning. I want to use the Windows task scheduler to run the VBA script.
I currently use windows task scheduler to run an automated MATLAB process. I have done this by putting the path of the MATLAB exe in the Program/script box and putting other parameters in the Add arguments & Start in text boxes. Is it possible to do something similar with Excel & if so how?
I have seen lots of people mention writing a VBA script which I do not wish to do.

How to report failed testcase in jira using automation

I am automating a website using selenium webdriver with java, I want to write the result "Pass" or "Fail" in excel sheet. How can i automate the reporting of a failed test case in JIRA by taking the status from excel sheet.
Since you are already writing to an excel file, I understand that you are able to access the contents of the Excel Sheet. If this is not completed yet, you might want to consider using http://poi.apache.org/spreadsheet/index.html for this purpose. Once you have the status of the test cases, you can use the JIRA API to create bugs https://ecosystem.atlassian.net/wiki/display/JRJC/Home. A more specific example of how to do this is mentioned here (https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Create+Issue).
However, since a bug (defect) usually requires more information than a simple PASS / FAIL, I would suggest that you might want to collect more information like the stack trace etc and save it in the excel file (or an XML file) when the test fails.
Which test runner are you using? If it is JUnit / TestNG, I believe a XML file is created by default for a test run, which might have some of this information.
You can use 'Apache POI' to read cells from Excel sheet and 'Jira Client' to update status in Jira.
'Jira Client' is a JIRA REST based client library for Java. You can read more about this here: https://github.com/rcarz/jira-client/blob/master/README.md