Java bindings for LambdaTest Tunnel. It supports latest stable Java Versions 20.0, 17.0, etc.
- 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>2.0.2</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.
- Create a Ticket in OSSRH for new release using "[email protected]" credential.. Wait for approval. Example:https://issues.sonatype.org/browse/OSSRH-66845
- Validate approval by login into https://oss.sonatype.org/#welcome using "[email protected]" credential.
- Generating gpg passphrase
gpg --gen-key
- Place below content after replacing PASSWORD with "[email protected]"`s password and PASSPHRASE with your gpg passphrase into ~/.m2/settings.xml file.
<settings>
<servers>
<server>
<id>ossrh</id>
<username>Lambdatest</username>
<password>PASSWORD</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
<settings>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.passphrase>PASSPHRASE</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
- Go inside lambdatest-mavan-tunnel and execute below command to deploy newer version to nexus repository manager.
mvn clean deploy
- After successfull deploy to nexus repository manager. Your central maven repository will be in sync with new version after few hours.(In my case took almost 2 days)