CAPABILITY GENERATOR

LambdaTest DocumentationAutomation Testing ● Codeship Integration With LambdaTest

Codeship Integration With LambdaTest


Codeship is a scalable, cloud-based platform for continuous integration that offers support to GitHub, Bitbucket, and GitLab projects. There are 2 versions of Codeship, Codeship Basic and Codeship Pro. Codeship Basic instantly provides robust VMs along with technology stacks being preinstalled to help run your CI/CD pipeline at a faster pace. Keep in mind though, the main purpose of Codeship Basic is to develop applications with general workflows by UI, it doesn’t offer support for dockers.

LambdaTest now integrates with Codeship to boost your go-to-market delivery. Perform automated cross browser testing with LambdaTest to ensure your development code renders seamlessly through an online Selenium grid providing 2000+ real browsers running through machines, on the cloud. Perform automation testing in parallel with LambdaTest’s Selenium grid to drastically trim down your test cycles.

Prerequisites


  1. Signing details of Codeship
  2. A GitHub repository. Here is our sample GitHub repository for Codeship Basic.
  3. LambdaTest Authentication Credentials
  4. 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.

    • For Linux/Mac:
      $ export LT_USERNAME= {your lambdatest username}
      $ export LT_ACCESS_KEY= {your lambdatest access_key}
    • For Windows:
      $ set LT_USERNAME= {your lambdatest username}
      $ set LT_ACCESS_KEY= {your lambdatest access_key}

Integrating Codeship With LambdaTest


Step 1: Sign up on Codeship with your GitHub account, and create a “New Project”.

Step 2: Select GitHub as your SCM.

Step 3: Provide your GitHub organization and your GitHub repository, then hit Connect.

Step 4: Now, you need to opt for Codeship Basic as your project type by clicking on “Select Basic Project”.

Step 5: You will be redirected to a screen of Project Settings. Select the technology to prepopulate basic commands with respect to your tests.
For below demonstration, we will be using Protractor so you can go ahead and select Node.js. Now, enter the below commands in setup.

Step 6: Create a new pipeline in the section “Configure Test Pipelines”. Use the below command to connect it with your GitHub repository by replacing the GitHubOrganization & reponame with the values provided in the input by you.

Step 7: Provide your LambdaTest authentication credentials in the Environment Variables and hit “Save and go to Dashboard” button.

That is it! Now, any changes you commit in your GitHub repository will trigger the build in Codeship and run your test on LambdaTest Selenium Grid.

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 Lambda Tunnel. With Lambda Tunnel, you can execute a test server inside your GitLab CI build a 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 Lambda Tunnel?

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

The below example of pipelinecommand would demonstrate you to leverage LambdaTest Selenium Grid by performing cross browser testing through the test server contained in your Codeship build.
Create two pipelines with the following commands:

Pipeline 1

Pipeline 2

Setup command will be same as mentioned earlier under the “Integration With Codeship” section. After then commit any changes into repository and get your test run using LambdaTest Tunnel.

Parallel Testing


Go to Project Settings screen. Change your pipeline command with following one & save settings.

Now, any changes commit in your repository will trigger a build and run automation tests in parallel on LambdaTest Selenium Grid.

Monitor and analyze your test result on the LambdaTest automation dashboard.

Deploy your code in a reliable manner at scale using Codeship integration with LambdaTest, and ensure it looks robust across every browser to provide a seamless user experience to all your visitors. Happy Testing!