Set LambdaTest username and access key in environment variables in the file lamdatest.env
Replace the values with your credentials, you can find them at (https://www.lambdatest.com/capabilities-generator/)
ln 1: export LT_USERNAME="Your Username"
ln 2: export LT_ACCESS_KEY="Your Access key"
After your save your credentials at lambdatest.env
please run the command:
$ source lambdatest.env
You can genegate the test capabilites at (https://www.lambdatest.com/capabilities-generator/) and choose Python as the language.
Now, can setup the capabilites of the test in the single_test.py
file at:
ln 13: desired_caps = {
ln 14: "build": 'PyunitTest sample build',
ln 15: "name": 'Py-unittest',
ln 16: "platform": 'Windows 10',
ln 17: "browserName": 'chrome',
ln 18: "version": 'latest',
ln 19: "console": 'true',
ln 20: "network":'true'
ln 21: }
You can setup the capabilites of your test in the parallel_test.py
file at:
browsers = [
{"build": 'PyunitTest sample build',"name": "Test 1", "platform": "Windows 10","browserName": "Chrome", "version": "latest"},
{"build": 'PyunitTest sample build',"name": "Test 2", "platform": "Windows 10","browserName": "edge", "version": "latest"}
]
To start a single test Run following command:
$ python single_test.py
To start a parallel test Run the following command:
$ python parallel_test.py
LambdaTest is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your selenium automation testing to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.