Configuring test scripts in Micro Focus ALM
You must configure the test script that you created in Micro Focus Application Lifecycle Management (ALM) to run the Web UI tests.
Before you begin
You must have performed the following tasks:
-
Created a test script in Micro Focus ALM. See Creating a test script in Micro Focus ALM.
-
Copied the content of the template file.
About this task
You can navigate to the alm directory to copy the content of the template file. The alm directory resides within the installation directory of HCL OneTest™ UI. The name of the template file is WebUI_ALM_Windows.txt and you can access the file from the following location:
Installation_dir\HCL\HCLOneTest\alm
For example, C:\Program Files\HCL\HCLOneTest\alm
- Workspace
- Project
- TestSuiteName
You must enter the parameter values within the double quotation marks. If the values of the parameter contain the double quotation marks, then the values must be enclosed in another double quotation marks. For example, if you want to add a label for a test result as "perf mon", then you must enter the parameter value in the script as follows:
Labels = ""perf mon""
Procedure
-
Log in to the Micro Focus ALM portal, if you are not already logged in.
The Micro Focus ALM dashboard is displayed.
- Expand Testing from the left pane, and then click Test Plan.
- Select a test script from the folder that you want to configure.
- Click the Test Script tab.
- Paste the content of the WebUI_ALM_Windows.txt file that you copied in the space provided in the Test Script tab.
-
Enter the parameter values that are required for your test run in the script by
referring to the following table:
Parameter Description Required Workspace Use this parameter to enter the complete path of the Eclipse workspace. Project Use this parameter to enter the name of the project that has test assets. TestSuiteName Use this parameter to enter the name of the test assets. For example,Workspace = "C:\Users\HCL\hclonetest\workspace1" Project = "proj1" TestSuiteName = "Tests/testHttp.testsuite"
Optional ConfigFile Use this parameter to provide the complete path to a configuration file that contains the parameters for a test run. ExportReport Use this option to export the unified report of UI tests to the file formats such as PDF, HTML, and XML. Note: The exported XML file is a JUnit XML file. You can view this file in applications that support JUnit reporting formats.The command syntax is as follows:
exportReport "type=<reporttype>;format=<file type1,file type2,file type3>;folder<destination folder path>;filename=<name of the exported file>
For example, to export the report to only the pdf format, you can use
exportReport "type=unified;format=pdf;folder=Exportedreport102;filename=testreport
If you want to export the report to multiple formats, you can specify the file formats as comma-separated values. The file type value can be in uppercase or lowercase.
For example, to export the report to all the supported formats, you can use exportReport "type=unified;format=pdf,xml,html;folder=Exportedreport102;filename=testreport
The report in different file formats use the same file name that is specified in the command.
ExportStatReportlist Use this parameter to provide a comma-separated list of absolute paths to custom report format files (.view files) that you can use to export statistical report data with ExportStatsFile. ExportStatsFile Use this parameter to provide the complete path to a directory that you can use to store exported statistical report data. ExportStatsHtml Use this parameter to provide the complete path to a directory that you can use to export web analytic results. The results are exported to the specified directory. You can analyze the results on a web browser without opening HCL OneTest™ UI. IMSharedLocation Use this parameter to enter the complete path to the HCLIMShared location. OverwriteResultsFile Set this parameter value to true or false to determine whether a result file with the same name must be overwritten or not. The default value is true.
ProtocolInput Use this option with additional arguments as follows:- To run a Web UI test in parallel on different
browsers:
ProtocolInput = "all.available.targets.in.parallel=all"
ProtocolInput = "all.available.targets.in.parallel=chrome,ff,ie"
Note: If you use the ProtocolInput option, you must not use the following equivalent VMArgs arguments:VMArgs "-Dall.available.targets.in.parallel=all" VMArgs "-Dall.available.targets.in.parallel=browser1,browswer2,browser3"
-
To specify the Web UI preferences such as highlighting the page element and capturing screens:
For example, ProtocolInput = "webui.highlight=<value>;webui.report.screenshots=<value>" where webui.highlight specifies whether the page element must be highlighted and webui.report specifies whether the screens must be captured while playing back the test in the browser.
Quiet Use this parameter to turn off any message output from the launcher and return to the command shell when the run or the attempt is complete.
ResultsFile Use this parameter to provide a different name to the result file. The default name of the result file is the name of the test or schedule with a timestamp appended.
UserComments Use this parameter to display comments that you added in the UserComments row of a report. Note:- When you run tests by using the double quotation marks ("") for the UserComments parameter, then the UserComments row of a report does not contain double quotation marks.
- To work around this problem, you must create a command-line config file, and then run the test by using the ConfigFile parameter.
VarFile Use this parameter to provide a complete path to the XML file that contains the variable name and value pairs. VMArgs Use this parameter to pass Java™ virtual machine arguments. - To run a Web UI test in parallel on different
browsers:
- Click the Save icon.