- Maven is required to be installed: https://maven.apache.org/install.html
- Global Dependencies
- Install Java8
- Lambdatest Credentials
- Set LambdaTest username and access key in environment variables. It can be obtained from LambdaTest dashboard
example:
- For linux/mac
export LT_USERNAME="YOUR_USERNAME" export LT_ACCESS_KEY="YOUR ACCESS KEY"
- For Windows
set LT_USERNAME="YOUR_USERNAME" set LT_ACCESS_KEY="YOUR ACCESS KEY"
- Set LambdaTest username and access key in environment variables. It can be obtained from LambdaTest dashboard
- Add following dependency to your POM.xml file
<dependency>
<groupId>com.github.lambdatest</groupId>
<artifactId>lambdatest-tunnel-binary</artifactId>
<version>1.0.4</version>
</dependency>
import com.lambdatest.tunnel.Tunnel;
# creates an instance of Tunnel
Tunnel t = new Tunnel();
# replace <lambdatest-username>,<lambdatest-accesskey> with your username and key. You can also set an environment variable - "LT_USERNAME" and "LT_ACCESS_KEY".
HashMap<String, String> tunnelArgs = new HashMap<String, String>();
tunnelArgs.put("user", "<lambdatest-username>");
tunnelArgs.put("key", "<lambdatest-accesskey>");
# starts the tunnel instance with the required arguments
t.start(tunnelArgs);
# stops the tunnel instance
t.stop();
Apart from the username and access key, all other lambdatest tunnel parameters are optional.
tunnelArgs.put("tunnelName","YourName");
tunnelArgs.put("pidFile","Your/pid/path");
tunnelArgs.put("dir","give/lambda/directory/path");
tunnelArgs.put("logFile","give/tunnel/log/directory/path");
For full list of tunnel parameters, please refer tunnel parameters documentation file.
- It may be useful to use a Java IDE such as IntelliJ or Eclipse to help troubleshoot potential issues.
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.