Install and setup

1. Install JDK8/11/17

2. Install Maven3+

3. Add the composite-automation-harness dependency to the maven project

Based on testng_7.5, selenium_3.141.59, jersey_2.25.1, jackson_2.13.4.2, freemarker_2.3.30, guice_4.2.2
And it is the last build for JDK8

1<dependency>
2    <groupId>tech.testnx.cah</groupId>
3    <artifactId>composite-automation-harness</artifactId>
4    <version>3.2.3</version>
5</dependency>

Based on testng_7.8, selenium_4.16.1, jersey_2.41, jackson_2.13.4.2, freemarker_2.3.32, guice_7.0.0 And it is main development branch for now.

1<dependency>
2    <groupId>tech.testnx.cah</groupId>
3    <artifactId>composite-automation-harness</artifactId>
4    <version>3.16.2</version>
5</dependency>

Pre-research is done, it is coming soon.

1<dependency>
2    <groupId>tech.testnx.cah</groupId>
3    <artifactId>composite-automation-harness</artifactId>
4    <version>4.x.x</version>
5</dependency>

4. Create and configure the directories in the maven project

Create the "resources" directory in home of the maven project and sub-directories based on below diagram. For exmape, there are two modules named module-1 and module-N, and two test environments named env1 and env2. In general the directories are created automatically when the first test execution.
And the "resources" directory can be configured by Environment Variable(CAH_HOME) or "cah-home" in user home or current working directory with java code. The more explain is refer to User Manual

graph LR A[Project] --> B(src) --> B.1(test) A[Project] --> C(resources) A[Project] --> D(pom.xml) C --> C.1(config) C.1 --> C.1.1(global-config.properties) C.1 --> C.1.2(module-1-config.properties) C.1 --> C.1.3(module-N-config.properties) C --> C.2(data) C.2 --> C.2.1(json) C.2.1 --> C.2.1.1(module-1) C.2.1.1 --> C.2.1.1.1(env1) --> C.2.1.1.1.1("module-1@env1.json") C.2.1.1 --> C.2.1.1.2(env2) --> C.2.1.1.2.1("module-1@env2.json") C.2.1 --> C.2.1.2(module-N) C.2.1.2 --> C.2.1.2.1(env1) --> C.2.1.2.1.1("module-N@env1.json") C.2.1.2 --> C.2.1.2.2(env2) --> C.2.1.2.2.1("module-N@env2.json") C.2 --> C.2.2(xls) C.2.2 --> C.2.2.1(module-1) C.2.2.1 --> C.2.2.1.1(env1) --> C.2.2.1.1.1("module-1@env1.xls") C.2.2.1 --> C.2.2.1.2(env2) --> C.2.2.1.2.1("module-1@env2.xls") C.2.2 --> C.2.2.2(module-N) C.2.2.2 --> C.2.2.2.1(env1) --> C.2.2.2.1.1("module-N@env1.xls") C.2.2.2 --> C.2.2.2.2(env2) --> C.2.2.2.2.1("module-N@env2.xls") C --> C.3(logs) C.3 --> C.3.1(browser) C --> C.4(reports) C --> C.5(temp)

5. Create the module configure files and module data files

In this case, there two modules(module-1 and module-N) and two environments(env1 and env2). Like module-1-config.properties, module-1@env1.xls and module-1@env1.json...

6. Framework will auto-detect and download target drivers and no need download by manual anymore.

Download Path for Chrome Driver, Firefox Driver or IE Driver

7. Create and set up the global-config.properties

 1#Project name and AT owner
 2Project_Name=Your_Project_Name
 3Project_Owner=Your_Project_Owner  
 4
 5#Selenium Driver Mode: Local, Remote
 6Selenium_Driver_Mode=Local
 7#Remote Driver Service URL(Grid Hub, Standlone, Docker), it only available when Selenium_Driver_Mode=Remote
 8Remote_Driver_Service_URL=http://<selenium-server>:4444
 9
10#Browser: CHROME, EDGE, FIREFOX
11Driver_Browser_Name=CHROME
12#Browser headless(True/False): Only valid for Chrome, Edge and Firefox
13Browser_Headless=false
14
15#Driver timeout setting, Unit: SECOND
16Driver_Implicit_Timeout=10
17Driver_Script_Timeout=10
18Driver_PageLoad_Timeout=60
19
20#Failure screenshot strategy: DEFAULT, FULL_SCREEN, FULL_DOM_PAGE
21#DEFAULT will not change browser display mode and just keep the original status before take screenshot
22#FULL_SCREEN will change browser display mode as full screen before take screenshot
23#FULL_DOM_PAGE will take screenshot for entire DOM page
24Failure_Screenshot_Strategy=DEFAULT
25
26#Retry count when a test is failed, that will re-execute entire test. Value 0 means no retry.
27Retry_Count=0
28
29#Log Level: TRACE, DEBUG, INFO, WARN, ERROR
30Log_Level=INFO
31
32#Log timezone: Asia/Shanghai   America/Los_Angeles  
33Log_TimeZone=Asia/Shanghai
34
35#Test Environment: env1, env2
36Test_Environment=env1
37
38#Test Data type: xls, json
39TEST_DATA_TYPE=json
40
41#SSH Client: JSCH, SSHJ, SSHD
42SSH_Client=JSCH
43
44#Report type(support multiple reports): CONSOLE, EXCEL, HTML_BOOTSTRAP, HTML_VUE_VUETIFY
45Report_Type=CONSOLE, EXCEL, HTML_BOOTSTRAP, HTML_VUE_VUETIFY
46
47#Keep reports history: TRUE, FALSE
48Keep_Reports=FALSE
49
50#Enable report aggregation: TRUE, FALSE
51#If enable, need set up the aggregation service end-point
52Enable_Report_Aggregation=FALSE
53Report_Aggregation_Endpoint=http://localhost:8600
54#Target Dashboard Type: BOOTSTRAP and VUE_VUETIFY
55Dashboard_Type=BOOTSTRAP
56
57#Monitor Provider(support multiple provider): Http_Archiver_Monitor, Web_API_Perf_Monitor, Web_UI_Perf_Monitor
58Monitor_Provider=Web_API_Perf_Monitor, Web_UI_Perf_Monitor
59#Enable Performance Monitoring: TRUE, FALSE
60Enable_Performance_Monitor=TRUE