-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expose taskId (or some way of uniquely identifying test runners) #2392
Comments
The taskId is an arbitrary number. Just generate a UUID if you need a unique number. |
@sjelin I'm not looking for a unique number, just a way to identify a task from another, period. If you know of a way to do this, please share. |
I don't understand. Surely giving each task a UUID is a way to identify one from another? |
Why do you need to know if a task is 1 or 2? Why won't a UUID work? Again the taskId is arbitrary and exposing it would force us to have to keep it consistent over new version releases. |
Probably easiest if I explain the use case: Our tests use random subdomains as part of our test scenario. To facilitate on CI, we generate a file of X random subdomains that are written to the hosts file. When we run the test, Y test instances get an equal share, X/Y, subdomains that are read from the aforementioned file. Since none of the instances are aware of one another and they cannot communicate, they use an index to grab their X/Y chunk of the subdomains available. E.g. the instance 1 is index 1 and reads from the beginning until X/Y, instance 2 reads from X/Y until (X/Y) * 2, etc. Since Protractor doesn't (to my knowledge) expose any way for us to identify a test runner, we use Hope that explains sufficiently. |
@juliemr thoughts? |
Any update / info on this? |
I think it wouldn't be unreasonable to add this to the processed config, but we need to make sure we're doing it in a sane and simple way so we don't break it going forward. |
I would love to have this feature soon, because I want customize my reporter with separate page for every file. Any progress? |
@sjelin How to the UUID approach works in the cases, I have 3 users, I config 3 instances to run at the same time and it would be very easy to get unique user with the currentInstance for example
|
I have the same problem. Can anyone explain how I can set a UUID per shard instance? The code from @lovedota above doesn't work (browser.getInstance() doesn't seem to exist). |
+1 to this. |
+1 to this. |
+1 |
When using test file sharding, I can't seem to find a way of uniquely identifying each runner. Being able to do so is helpful when synchronizing shared resources between the runners.
By taskId, I'm referring to
chrome #1-1
, etc.protractor/lib/taskScheduler.js
Line 90 in 6ebc4c3
The text was updated successfully, but these errors were encountered: