I'm sharding (running in parallel) my Protractor tests and am storing each test's result in a database. I need a way to tie all the tests from a single test run together. The plan was to set an id in the config and include it in DB. Problem is, the config gets re-run for each sharded test (ie. multiple times)... so I end up with multiple IDs. No bueno.
So, anyone have an idea on how I might set a single, unique id, once at the beginning of a sharded test run?
Update:
To clarify, I was hoping there might be a simple solution within Protractor itself. Otherwise I'll just create an id (eg. via grunt/gulp/npm) and pass it via the cli via --params.specRunId=xxxxx
.