Test any website using Chrome Headless, Puppeteer, Mocha and Chai.
This example makes sure it is possible to perform a search on Google.com.
docker run --rm -v "$(pwd)"/example01/test:/app/test \
-v "$(pwd)"/artifacts:/artifacts \
dcycle/browsertesting:4
This second example builds a "to do" app in a Docker container, then runs tests against it.
cd ./example02 && ./build-sample-app.sh && cd ..
docker run --rm -v "$(pwd)"/example02/test:/app/test \
-v "$(pwd)"/artifacts:/artifacts \
--network myapp-network \
dcycle/browsertesting:4 test/test.js
docker run --rm -v "$(pwd)"/example01/failing-test-example:/app/test \
-v "$(pwd)"/artifacts:/artifacts \
dcycle/browsertesting:4
docker run --rm -v "$(pwd)"/example01/passing-test-example:/app/test \
-v "$(pwd)"/artifacts:/artifacts \
dcycle/browsertesting:4
docker run --rm -v "$(pwd)"/example01/selector-not-present-example:/app/test \
-v "$(pwd)"/artifacts:/artifacts \
dcycle/browsertesting:4
it('It should be possible to search for something on Google', async function() {
this.timeout(15000);
})
const { expect } = require('chai')
, use import { expect } from 'chai';