LambdaTestAutomation Testing ● Semaphore CI Integration With LambdaTest

Semaphore CI Integration With LambdaTest

Semaphore is a hosted continuous integration and deployment service used for testing and deploying software projects hosted on GitHub and BitBucket. While open source projects can use Semaphore for free in its full capacity, free use for private projects is limited to 100 builds per month.

LambdaTest now integrates with Semaphore CI to boost your go-to-market delivery. Perform automated cross browser testing, hand in hand with your CI/CD pipeline and ensure your web-app renders seamlessly on more than 2000 real browsers and browser versions. Using LambdaTest Selenium Grid, you can fully automate your continuous testing process and trim down your test cycles, significantly.

Prerequisites For Integrating Semaphore CI With LambdaTest

We will be performing demonstration by using the Protractor framework

  1. Global Dependencies
    • A Git or GitHub repository
    • Download and install node.js and node package manager or npm.
      To install node.js with homebrew use the below command.
    • If you have npm already installed, you may want to upgrade it to latest version. Here the code you can run in your terminal to upgrade npm.
  2. LambdaTest Authentication Credentials
    • Be aware of your LambdaTest authentication credentials i.e. your LambdaTest username, access key and HubURL. You need to set them up as your environment variables. You can retrieve them from your LambdaTest automation dashboard by clicking on the key icon near the help button.

Integrating LambdaTest With Semaphore CI

A few changes in the .semaphore/semaphore.yml is all you need for integrating LambdaTest With Semaphore CI. The These changes would include replacing the environment variables such as access key, username, grid config and so on, according to your test configurations.

Here is a sample config file for integrating your LambdaTest account with your Semaphore CI instacnce. You can also find the below code at our GitHub repository of Semaphore.

LambdaTest offers a Selenium Desired Capabilities Generator to fetch coded values for your desired test configurations.
For Instance, if you select the below configurations:

Selected Values
Operating System
Windows 8.1
Mozilla Firefox
Browser Version
Selenium Version

Then Capabilities Generator at LambdaTest will provide you with the below program:

For more information, refer to our documentation on Selenium Automation Capabilities.

Testing Locally Hosted or Privately Hosted Projects

To help you perform cross browser testing of your locally stored web pages, LambdaTest provides an SSH(Secure Shell) tunnel connection with the name LambdaTest Tunnel. With LambdaTest Tunnel, you can execute a test server inside your Semaphore CI build container to perform automated cross browser testing on browsers offered by Selenium grid on LambdaTest. So you make sure how well your changes look, even before your customers. Curious to know more about LambdaTest Tunnel?

Follow our documentation on LambdaTest Tunnel to know it all. OS specific instructions to download and setup tunnel binary can be found at the following links.

Now, let us take an example of Semaphore.yml for LambdaTest Tunnel.

Parallel Testing

Parallel Testing is one of the most demanding features of LambdaTest Selenium Grid. By parallel testing, you can run more than one test case, simultaneously. This means that Parallel testing would allow you to execute numerous automation test cases altogether. So you execute a single test scenario across different browsers or could run different test scenarios across the same browser but with different browser versions.

To perform automation testing in parallel on Windows use the below command.

Monitor and analyze your test result on the LambdaTest Automation Dashboard. Deploy your code in a reliable manner at scale using Semaphore CI integration with LambdaTest, and ensure it looks robust across every browser to provide a seamless user experience to all your visitors. Happy Testing!