Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

462
Views
How to send different data to each script running in parallel using NodeJS, Protractor, and Saucelabs?

I have multiple automation scripts setup with NodeJS, Protractor, Jasmine Framework and SauceLabs.

Each script is in separate .JS files and it reads data from .JSON files. I have defined login credentials and all other necessary data within the JSON files.

multiCapabilities: [{
    browserName: 'chrome',
    version: 'latest',
    platform: 'Windows 8',
    name: "tests",
    splitTestsBetweenCapabilities: true,
    acceptInsecureCerts: true,
    cssSelectorsEnabled: true,
    shardTestFiles: true,
    maxInstances: 5,
}],
maxSessions: 5,

Using this config, I am able to trigger 5 instances of Chrome browser and run 5 different scripts each fetching data on their own.

The problem is I need to use a rotating list of 20 login credentials for each script. I am not sure if there are any packages that do this already.

How should I approach this, so that each script can use one unique username and password? Each script should be able to pick a random credential and other scripts shouldn't able to use that until that script completes its' run.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use a separate process to update the data on the .json files and then trigger the scripts as you would normally.

There are npm packages like json-update available or you can build your own script to run before your script.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!