I am using protractor-cucumber framework(protractor 5.2.2 and cucumber 3.2.0).I need to enter some data for multiple users into our application.I am running my protractor script by distributed test execution by selenium grid2(selenium-server-standalone-3.14.0.jar). So that i am able run my script in 5 nodes(each node having only one browser setup).The multiCapabilities when i am running with single user is given below.
multiCapabilities: [
{
browserName: 'chrome',
BatchNo:1
},
{
browserName: 'firefox',
BatchNo:2
},
{
browserName: 'internet explorer',
BatchNo:3
},
{
browserName: 'chrome',
BatchNo:4
},
{
browserName: 'firefox',
BatchNo:5
},
],
My aim is to run with multiple users.so that after processing first user data in all 5 nodes, i have to process next user data.i have a array of user id
var userid=[1500,1501,1502]
So can i use a loop inside multiCapabilities and pass userid to each object of multiCapabilities. What i need is, if i have given userid in each object of the multiCapabilities,then first userid request should pass to the all 5 nodes and those 5 nodes should process the data of first user, after completing the first user, then next userid request should pass to the all 5 nodes and those 5 nodes should process the data of the second user and so on.But my understanding is once we set the multiCapabilities, then we cannot reset it after giving the command "protractor conf.js" .So how can i do this?Thanks in advance.