I have a set of automated tests that use protractor/jasmine, and are written in typescript. When the tests finish running, I see this message in the console:
Executed 426 of 426 specs SUCCESS in 16 mins 36 secs.
I recently updated my tests to run in parallel, with this configuration:
capabilities: {
browserName: "chrome",
chromeOptions: {
args: [
'--disable-dev-shm-usage'
],
},
shardTestFiles: true,
maxInstances: 3
}
Now, as each test finishes, each web-driver instance reports the number of specs executed:
12:51:37 ------------------------------------
12:51:37
12:51:37 [17:51:37] I/testLogger - [chrome #01-36] PID: 693
12:51:37 [chrome #01-36] Specs: /opt/app/typeScript/specs/spec1.js
12:51:37 [chrome #01-36]
12:51:37 [chrome #01-36] [17:51:22] I/hosted - Using the selenium server at http://selenium.local:4444/wd/hub
12:51:37 [chrome #01-36] Jasmine started
12:51:37 [chrome #01-36]
12:51:37 [chrome #01-36] Test 1
12:51:37 [chrome #01-36] ��� Step 1
12:51:37 [chrome #01-36] ��� Step 2
12:51:37 [chrome #01-36] ��� Step 3
12:51:37 [chrome #01-36] ��� Step 4
12:51:37 [chrome #01-36]
12:51:37 [chrome #01-36] Executed 4 of 4 specs SUCCESS in 10 secs.
12:51:37
12:51:37 [17:51:37] I/testLogger -
12:51:37
12:51:37 [17:51:37] I/launcher - 3 instance(s) of WebDriver still running
12:51:48 ......[17:51:48] I/testLogger -
12:51:48 ------------------------------------
12:51:48
12:51:48 [17:51:48] I/testLogger - [chrome #01-37] PID: 708
12:51:48 [chrome #01-37] Specs: /opt/app/typeScript/specs/spec2.js
12:51:48 [chrome #01-37]
12:51:48 [chrome #01-37] [17:51:27] I/hosted - Using the selenium server at http://selenium.local:4444/wd/hub
12:51:48 [chrome #01-37] Jasmine started
12:51:48 [chrome #01-37]
12:51:48 [chrome #01-37] Test 2
12:51:48 [chrome #01-37] ��� Step 1
12:51:48 [chrome #01-37] ��� Step 2
12:51:48 [chrome #01-37] ��� Step 3
12:51:48 [chrome #01-37] ��� Step 4
12:51:48 [chrome #01-37]
12:51:48 [chrome #01-37] Executed 4 of 4 specs SUCCESS in 17 secs.
My Question: With my tests running in parallel, how can I get the console to output the total number of specs executed, instead of just the number of specs executed per instance of a web-driver? In other words, I want to keep my tests running in parallel and have it show me this message at the end:
Executed 426 of 426 specs SUCCESS in 16 mins 36 secs.