You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.
Since running integration tests in parallel is one of the great benefits of the project it'd be good to have a small example showing how it can be done. The examples available right now enlighten the uses in automation and scraping, but not so much on tests.
The text was updated successfully, but these errors were encountered:
While we don't yet have a "recommended" way, here are two options. Both assume you're running the tests over the Proxy.:
Write tests with a test runner that supports concurrent execution (e.g. ava --concurrency <num>, jest--maxWorkers=<num>). Then write any number of tests, for example:
export CHROMELESS_ENDPOINT_URL=https://XXXXX.execute-api.eu-west-1.amazonaws.com/dev
export CHROMELESS_ENDPOINT_API_KEY=mulolKOvmeowIaqEC6Azs9Csausages2lCychahal
ava
This first method is used by Graphcool for integration tests on in-production code. You can see a work-in-progress example of this in their Console repository. You'll start seeing these types of tests more within this repository as we improve our test coverage.
Initialise a Chromeless instance n-times that you need it. For example, here's a hacky way I test the Proxy's parallelisation:
constChromeless=require('chromeless').defaultasyncfunctionrun(){constchromeless=newChromeless({remote: {endpointUrl: 'https://XXXXX.execute-api.eu-west-1.amazonaws.com/dev',apiKey: 'mulolKOvmeowIaqEC6Azs9Csausages2lCychahal',},debug: true,})constscreenshot=awaitchromeless.goto('https://www.google.com').type('chromeless','input[name="q"]').press(13).wait('#resultStats').screenshot()console.log(screenshot)// prints local file path or S3 urlawaitchromeless.end()}constconcurrency=1// increase this to run multiple at once. May cause unexpected AWS usage billing if you're not careful.for(vari=0;i<concurrency;i++){run().catch(console.error.bind(console))}
Since running integration tests in parallel is one of the great benefits of the project it'd be good to have a small example showing how it can be done. The examples available right now enlighten the uses in automation and scraping, but not so much on tests.
The text was updated successfully, but these errors were encountered: