Skip to content

Commit 5f41e8e

Browse files
authored
Merge pull request #1 from IBM/Bootstrap
2 parents 85ee7c4 + 729e2e4 commit 5f41e8e

File tree

8 files changed

+10992
-2
lines changed

8 files changed

+10992
-2
lines changed

.github/workflows/WebUI.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Rational Functional Tester - UI Test
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
WebUI-Action:
7+
runs-on: self-hosted
8+
name: Rational Functional Tester - UI Test
9+
steps:
10+
- name: Rational Functional Tester - UI Test
11+
uses: IBM/IBM-RFTWebUI-GitHub-Action@main
12+
with:
13+
workspace:
14+
project:
15+
suite:
16+
imshared:
17+
configFile:
18+
exportLog:
19+
exportReport:
20+
exportStatReportList:
21+
exportStats:
22+
exportStatsFormat:
23+
exportStatsHtml:
24+
imports:
25+
labels:
26+
overwrite:
27+
protocolInput:
28+
publish:
29+
publishFor:
30+
publishReports:
31+
results:
32+
swapDatasets:
33+
userComments:
34+
varFile:
35+
vmArgs:

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Dependency directories
11+
node_modules/

README.md

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,77 @@
1-
# devopsauto-uitest-actions
2-
This is a gitHub Action workflow for IBM DevOps Automation UI Testing
1+
## Rational Functional Tester - UI Test GitHub Action
2+
Rational Test provides software testing tools to support a DevOps approach: API testing, functional testing, UI testing, performance testing and service virtualization. It helps you automate and run tests earlier and more frequently to discover errors sooner - when they are less costly to fix.
3+
4+
This action enables the ability to run WebUI tests from Rational Functional Tester projects on self hosted runners.
5+
6+
## Usage
7+
8+
### Prerequisites
9+
10+
Configure a self hosted runner on a suitable machine
11+
1. The host machine will need a licensed copy of Rational Functional Tester and the UI projects containing the tests you wish to run.
12+
2. [Add a self-hosted runner](https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners) at an appropriate level, ensure you have configured network access.
13+
3. If you are using more than one runner [assign it a suitable label](https://docs.github.com/en/actions/hosting-your-own-runners/using-labels-with-self-hosted-runners) and note this for later.
14+
15+
### Setup
16+
In the repository you want to apply the action to
17+
1. Create a folder named ".github/workflows" in the root.
18+
2. Create a .yml file with any name, inside the ".github/workflows" folder based on the following example content:
19+
20+
```yaml
21+
22+
name: Rational Functional Tester - UI Test
23+
24+
on: workflow_dispatch
25+
26+
jobs:
27+
WebUI-Action:
28+
name: Rational Functional Tester - UI Test
29+
runs-on: self-hosted
30+
steps:
31+
- name: Rational Functional Tester - UI Test
32+
uses: IBM/devopsauto-uitest-actions@main
33+
with:
34+
workspace: <C:\Data\SampleWorkspace>
35+
project: <MyProject>
36+
suite: <MySuite>
37+
```
38+
39+
3. Update the parameterized items to refer to your project and tests (see parameter details below).
40+
4. If you have more than one runner configured, then use its label as the argument for **runs-on**.
41+
5. Push your updated yml file to the repository.
42+
6. Go to the Actions section in the repository and select the workflow.
43+
7. Click the Run workflow dropdown and the list of input boxes get displayed.
44+
45+
As an alternative to having all of the test projects pre-configured on the runner machine, users could leverage other actions within the workflow to pull down the latest copies.
46+
47+
### Required Parameters
48+
- **workspace** Complete path to Eclipse workspace.
49+
- **project** The name of the project containing the test.
50+
- **suite** The relative path from the project to the test including the file name of the test. A test can be WebUI test, Compound test, Performance schedule or Accelerated Functional Test (AFT) suite. The test suite name must contain the file extension when it is an AFT suite. To run multiple tests from the same project sequentially, you must separate the tests by a colon (:). If you provide multiple tests, you cannot include an AFT suite along with it.
51+
52+
### Optional Parameters
53+
- **imShared** Complete path to IBMIMShared location, if it is not at default location.
54+
- **configFile** The complete path to a file that contains the parameters for a test or schedule run, If Config file is specified then no other fields will be required.
55+
- **exportLog** You can use this parameter to specify the file directory path to store the exported HTTP test log. You can provide multiple parameter entries when running multiple tests. You must use a colon to separate the parameter entries. For example: c:/logexport.txt:c:/secondlogexport.txt
56+
- **exportReport** Use this option to export the unified report of UI tests to the file formats such as PDF, HTML, and XML. For example, to export the report to only the PDF format, you can input "type=unified;format=pdf;folder=Exportedreport102;filename=testreport"
57+
- **exportStatReportList** You can use this option to specify a comma-separated list of report IDs along with exportstats or exportstatshtml to list the reports that you want to export in place of the default reports, or the reports selected under Preferences. To retrieve the report IDs, navigate to Window > Preferences > Test > Performance Test Reports > Export Reports from Rational Functional Tester and under Select reports to export, select the required reports, and click Copy ID to clipboard.
58+
- **exportStats** The complete path to a directory in which to store exported statistical report data.
59+
- **exportStatsFormat** Use this field to enter one or more formats for the reports that you want to export by using a comma as a separator. The options are simple.csv, full.csv, simple.json, full.json, csv, and json. When you want to export both simple and full reports in json or csv format, you can specify json or csv as the options. The reports are saved to the location specified in the exportStats field. This field must be used in conjunction with exportStats field.
60+
- **exportStatsHtml** Specify the complete path to a directory in which to export web analytic results. Analyze the results on a web browser without using the workbench. If you are running multiple tests, do not provide a value in this field.
61+
- **imports** Path of the Project location to be imported. You can also use an empty workspace folder on your computer to import the UI Test project resources and run the tests.
62+
- **labels** Use this option to add labels to test results. To add multiple labels to a test result, you must separate each label by using a comma.
63+
- **overwrite** Determines whether a result file with the same name is overwritten. The default value, false, indicates that the new result file is created. If the value is true, the file is overwritten and retains the same file name.
64+
- **protocolInput** You can use this option with additional arguments as follows:
65+
- To run a Web UI test in parallel on different browsers, input the value: all.available.targets.in.parallel=all
66+
- To specify the Web UI preferences such as highlighting the page element and capturing screens, input the value: webui.highlight=value;webui.report.screenshots=value
67+
- To run only the failed tests from a previous playback in an Accelerated Functional Test suite, input the value: runfailedtests=true
68+
- To automatically resolve the browser and driver incompatibility, while you play back the Web UI tests, input the value: webui.browser.driver.autoupdate=true
69+
- To apply guided-healing and self-healing features while you run Web UI tests, input the value: autoheal=true
70+
- **publish** You can use this parameter to publish test results to the Server. The format is: serverURL#project.name=projectName&amp;teamspace.name=teamspaceName. If the name of the project or team space contains a special character, then you must replace it with %<Hex_value_of_special_character>.
71+
- **publishFor** You can use this option to publish the test results based on the completion status of the tests. The supported values are FAIL,PASS,INCONCLUSIVE,ERROR,ALL.
72+
- **publishReports** You can use this option to publish specific test results to the Server. The supported values are FT, STATS, TESTLOG.
73+
- **results** Specify a name for the results file. If you do not specify a name, the test or schedule name appended by the timestamp is used for the name. The results file is stored in the Results directory. If you are running multiple tests, do not provide a name for the results file.
74+
- **swapDatasets** Use this option to replace dataset values during a test or schedule run. You must ensure that both original and new datasets are in the same workspace and have the same column names. You must also include the path to the dataset. For example, /project_name/ds_path/ds_filename.csv:/project_name/ds_path/new_ds_filename.csv
75+
- **userComments** Add text to display it in the User Comments row of the report.
76+
- **varFile** The complete path to the XML file that contains the variable name and value pairs.
77+
- **vmArgs** To specify the Java™ maximum heap size for the Java™ process that controls the command line playback, use the option with the -Xmx argument. For example, when you input -Xmx4096m, it specifies a maximum heap size of 4096m. To execute tests in parallel on all mobile devices, which are in passive mode, connected to the workbench and ready for playback, input the value: "-Dall.available.targets.in.parallel=true". To execute tests in parallel on all supported desktop browsers and connected mobile devices, input the value "-Dall.available.targets.in.parallel=all". To execute tests in parallel on selected desktop browsers and connected mobile devices, input the value "-Dall.available.targets.in.parallel=browser1,browswer2,browser3". You must separate browser names with a comma. For example, firefox, ff, chrome, ie, ie64, safari, "-Dall.available.targets.in.parallel=browser1,browser2,browser3".

action.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: 'Rational Functional Tester - UI Test GitHub Action'
2+
description: 'Execute Rational Functional Tester - UI Test based tests and compound tests from GitHub Actions workflows.'
3+
branding:
4+
icon: 'check-square'
5+
color: 'purple'
6+
inputs:
7+
workspace:
8+
description: 'The complete path to the Eclipse workspace, required if Config File is not specified'
9+
required: true
10+
11+
project:
12+
description: 'The name of a project within the workspace to use, required if Config File is not specified'
13+
required: true
14+
15+
suite:
16+
description: 'The name of a test within the project to use. A test can be WebUI test, Compound test, Performance schedule or Accelerated Functional Test (AFT) suite, required if Config File is not specified'
17+
required: true
18+
19+
imshared:
20+
description: 'The path to the IMShared folder in your local installation, if it is not at default location. This is where plugins and product dependencies will be located by the execution agent, required if Config File is not specified'
21+
required: false
22+
23+
configFile:
24+
description: 'Use this option to specify the complete path to a file that contains the parameters for a test run.'
25+
required: false
26+
27+
exportLog:
28+
description: 'You can use this parameter to specify the file directory path to store the exported HTTP test log. You can provide multiple parameter entries when running multiple tests. You must use a colon to separate the parameter entries. For example: c:/logexport.txt:c:/secondlogexport.txt'
29+
required: false
30+
31+
exportReport:
32+
description: 'Use this option to export the unified report to any of the formats - PDF, XML or HTML. For example, to export the report to only the pdf format, you can input: type=unified;format=pdf;folder=path;filename=testreport. If you want to export the report to multiple formats, you can specify the file formats as comma-separated values.'
33+
required: false
34+
35+
exportStatReportList:
36+
description: 'You can use this option to specify a comma-separated list of report IDs along with exportstats or exportstatshtml to list the reports that you want to export in place of the default reports, or the reports selected under Preferences. To retrieve the report IDs, navigate to Window > Preferences > Test > Performance Test Reports > Export Reports from Rational Functional Tester and under Select reports to export, select the required reports, and click Copy ID to clipboard.'
37+
required: false
38+
39+
exportStats:
40+
description: 'Use this option to provide the complete path to a directory that you can use to store the exported report in a comma-separated values (CSV) format.'
41+
required: false
42+
43+
exportStatsFormat:
44+
description: 'Use this field to enter one or more formats for the reports that you want to export by using a comma as a separator. The options are simple.csv, full.csv, simple.json, full.json, csv, and json. When you want to export both simple and full reports in json or csv format, you can specify json or csv as the options. The reports are saved to the location specified in the exportStats field. This field must be used in conjunction with exportStats field.'
45+
required: false
46+
47+
exportStatsHtml:
48+
description: 'Use this option if you want to export web analytic results only. The results are exported in the specified directory. You can then analyze the results on a web browser without using the test workbench.'
49+
required: false
50+
51+
imports:
52+
description: 'Path of the Project location to be imported. You can also use an empty workspace folder on your computer to import the UI Test project resources and run the tests.'
53+
required: false
54+
55+
labels:
56+
description: 'Use this option to add labels to test results. To add multiple labels to a test result, you must separate each label by using a comma.'
57+
required: false
58+
59+
overwrite:
60+
description: 'Determines whether a result file with the same name is overwritten. The default value, false, indicates that the new result file is created. If the value is true, the file is overwritten and retains the same file name'
61+
required: false
62+
63+
protocolInput:
64+
description: 'Use this argument to run a Web UI test in parallel on different browsers.'
65+
required: false
66+
67+
publish:
68+
description: 'You can use this parameter to publish test results to the Server. The format is: serverURL#project.name=projectName&amp;teamspace.name=teamspaceName.'
69+
required: false
70+
71+
publishFor:
72+
description: 'You can use this option to publish the test results based on the completion status of the tests. The supported values are FAIL,PASS,INCONCLUSIVE,ERROR,ALL.'
73+
required: false
74+
75+
publishReports:
76+
description: 'You can use this option to publish specific test results to the Server. The supported values are FT, STATS, TESTLOG.'
77+
required: false
78+
79+
results:
80+
description: 'Specify a name for the results file. If you do not specify a name, the test or schedule name appended by the timestamp is used for the name. The results file is stored in the Results directory. If you are running multiple tests, do not provide a name for the results file.'
81+
required: false
82+
83+
swapDatasets:
84+
description: 'Use this option to replace dataset values during a test or schedule run. You must ensure that both original and new datasets are in the same workspace and have the same column names. You must also include the path to the dataset. For example, /project_name/ds_path/ds_filename.csv:/project_name/ds_path/new_ds_filename.csv'
85+
required: false
86+
87+
userComments:
88+
description: 'Add text to display it in the User Comments row of the report.'
89+
required: false
90+
91+
varFile:
92+
description: 'The complete path to the XML file that contains the variable name and value pairs.'
93+
required: false
94+
95+
vmArgs:
96+
description: 'To specify the Java™ maximum heap size for the Java™ process that controls the command line playback, use this option with the -Xmx argument. For example, when you input -Xmx4096m, it specifies a maximum heap size of 4096m. To execute tests in parallel on all mobile devices, which are in passive mode, connected to the workbench and ready for playback, input the value: "-Dall.available.targets.in.parallel=true". To execute tests in parallel on all supported desktop browsers and connected mobile devices, input the value "-Dall.available.targets.in.parallel=all". To execute tests in parallel on selected desktop browsers and connected mobile devices, input the value "-Dall.available.targets.in.parallel=browser1,browswer2,browser3". You must separate browser names with a comma. For example, firefox, ff, chrome, ie, ie64, safari, "-Dall.available.targets.in.parallel=browser1,browser2,browser3".'
97+
required: false
98+
runs:
99+
using: 'node16'
100+
main: 'dist/index.js'

0 commit comments

Comments
 (0)