You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2021/02/08 22:44:54 UTC

[trafficcontrol] branch master updated: Update parallelization configuration and readme file instruction (#5497)

This is an automated email from the ASF dual-hosted git repository.

mitchell852 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 14dceb0  Update parallelization configuration and readme file instruction (#5497)
14dceb0 is described below

commit 14dceb0261575ad667f65368e28ea3dfa2f4700d
Author: dpham <ph...@yahoo.com>
AuthorDate: Mon Feb 8 15:44:42 2021 -0700

    Update parallelization configuration and readme file instruction (#5497)
    
    * Update parallelization and readme
    
    Co-authored-by: Pham, Dandy (Contractor) <Da...@comcast.com>
---
 traffic_portal/test/integration/Readme.md | 38 ++++++++++++++++++++-----------
 traffic_portal/test/integration/config.ts |  4 ++--
 2 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/traffic_portal/test/integration/Readme.md b/traffic_portal/test/integration/Readme.md
index d6e727e..8f0aafe 100644
--- a/traffic_portal/test/integration/Readme.md
+++ b/traffic_portal/test/integration/Readme.md
@@ -1,18 +1,30 @@
 # Traffic Portal Test Automation 
 
-### Test Development Environment Setup
----
-* Install [Node](http://nodejs.org) (v6.x.x or later) `brew install node`
-* Follow setup steps described [here](http://www.protractortest.org/#/tutorial#setup)
+**Test Development Environment Setup**
+
+* Install [Node](http://nodejs.org) (v6.x.x or later): `brew install node`
+* Follow setup steps described to install protractor: [here](http://www.protractortest.org/#/tutorial#setup)
 * Now install packages manager: `npm install`
-* Now install protractor `npm i protractor`
-* Now install typescript `npm install typescript@3.6.4 -g`
-* Now install selenium standalone- `sudo webdriver-manager update`
-* In a separate command line window, run `sudo webdriver-manager start` and keep it running.
-* Run CDN-in-a-Box and make sure all the components and features display.
+* Now install protractor: `npm i protractor`
+* Now install typescript: `npm install typescript@3.6.4 -g`
+* Now install selenium standalone: `sudo webdriver-manager update`
+* In a separate command line window, run: `sudo webdriver-manager start` and keep it running.
+* Run CDN-in-a-Box in a separate command line window and make sure all the components and features display.
+
+**How To Run Tests**
 
-### Run Tests
----
-run `tsc` from integration directory. This command will compile and convert the typescript files into javascript files. The generated js files are available in integration/GeneratedCode directory
-run `protractor ./GeneratedCode/config.js --params.baseUrl='https://localhost:443'` from integration directory. This command will run the protractor test from the environment user input.
+Run this command below from integration directory. This command will compile and convert the typescript files into javascript files. The generated js files are available in integration/GeneratedCode directory.
+```
+tsc
+```
+After that, run this command below to run the protractor test from the environment user input.
+```
+protractor ./GeneratedCode/config.js --params.baseUrl='https://localhost:443'
+```
+**Command Line Parameters**
 
+| Flag                            | Description                                                                                          |
+| ------------------------------- | :--------------------------------------------------------------------------------------------------: |
+| params.baseUrl                  | Environment test run on. Tests are written for cdn-in-a-box only. Do not run on other environment                                   |
+| capabilities.shardTestFiles     | Input `true` or `false` to turn on or off parallelization. If the value is false, maxInstances will always count as 1. The default value in the config file = false                            |
+| capabilities.maxInstances       | Input number of chrome instances that your machine can handle. Test will fail if local machine cannot handle a lot of chrome instances. The default value = 1    |
diff --git a/traffic_portal/test/integration/config.ts b/traffic_portal/test/integration/config.ts
index df0e1de..27e407b 100644
--- a/traffic_portal/test/integration/config.ts
+++ b/traffic_portal/test/integration/config.ts
@@ -35,8 +35,8 @@ export let config: Config = {
   capabilities: {
     browserName: 'chrome',
     //Parallelization Configuration (shardTestFiles and maxInstances)
-    // shardTestFiles: true,
-    // maxInstances: 50,
+    shardTestFiles: false,
+    maxInstances: 1,
     marionette: true,
     acceptInsecureCerts: true,
     acceptSslCerts: true,