Close

CAPABILITY GENERATOR

LambdaTestLambdatest Integrations ● Run Selenium Tests With Google Cloud CI

Run Selenium Tests With Google Cloud CI


Google Cloud Platform is one of the market’s leading public cloud providers and offers a variety of management services. Google Cloud Build and Google Cloud Run are two Google Cloud services that use pipelines to automate builds and deployments.

Integrate your Selenium test suites with Google Cloud CI and perform automated cross-browser testing on online Selenium Grid over 2000+ real browser environments. With this integration, you can also perform local testing of locally or privately hosted projects and Parallel testing to cut short test execution cycles and achieve faster go-to-market delivery.

Prerequisites


Before integrating Google Cloud CI with LambdaTest, make sure you have the following things:

  1. A GitHub or a BitBucket repository. All the code samples in this documentation can be found at LambdaTest Google Cloud CI repository on GitHub .
  2. To integrate test suites with Google Cloud CI, you would need to set your LambdaTest username and access key in environment variables. You can get them from Automation Dashboard by clicking on the Key button from the top-right.
    • For Windows:

    • For Mac/Linux:

Integrating A GitHub Repository With Google Cloud CI


To integrate Google Cloud CI with LambdaTest, you will need to fork the above LambdaTest Google Cloud CI repository.

  1. Go to the Google Cloud CI console and select ‘Cloud Build’.
  2. Once you’re in the Cloud Build, click on ‘Triggers’.
  3. To use the trigger functionality, you will need to connect your GitHub repository to Google Cloud CI instance. Click on ‘Connect Repository’.

  4. Once you click on Connect Repository, you will need to complete the steps in order to connect your repository.

Running Single Test Via Google Cloud CI


  1. After connecting to the repository, click on ‘Create Trigger’.
    • Provide a Trigger name.
    • Select the repository’s source and then select the branch.
    • Under the ‘Configuration’, select Cloud Build configuration file (yaml or json).
    • In the ‘Advanced’ category, click on ‘Add Variable’.

      Enter your LambdaTest Username and Access Key in the provided field and then click on ‘Create’.
  2. Your trigger project will be created on the selected Google Cloud CI GitHub repository. To run the single test through Google Cloud CI, click on ‘Run’.
  3. A new build can be seen in the Google Cloud CI console. The current status of this build will be ‘Running’ or ‘Successful’.

    You can also view the detailed insights of your test execution on LambdaTest Automation dashboard.

Running Parallel Test Via Google Cloud CI


To run parallel tests on LambdaTest cloud, you will need to make minor tweaks in cloudbuild.yml file.

In the above YAML code, you need to add the following command to args.

Below is the screenshot of the above-executed parallel tests.

Running Local Test Via Google Cloud CI


To run local tests on LambdaTest cloud, you will need to make minor tweaks in cloudbuild.yml file.

Add the below command to args.

Below is the screenshot of the above-executed local tests.

That’s all! Ship your quality product faster using LambdaTest and Google Cloud CI integration. In case you have any queries for us, feel free to drop them at our 24*7 customer chat support or you can also mail us at [email protected]. Happy Testing!