Taking Screenshots of Pages Behind Login


LambdaTest offers Screenshot testing, a feature to automatically capture bulk, full-paged screenshots of any URL over different browsers. You can perform cross browser compatibility testing on both mobile, and desktop browsers at the same time. Also, you can capture up to 25 screenshots in a single test session.

This document will help you understand how you can capture bulk screenshots of your web-application, after the login page, for different browsers to measure the cross browser compatibility. Refer to our Automated Screenshot testing document to know more.

Understanding The Basics Of Login Profile


In order to capture screenshots after the login page of your website, you are required to configure a login profile in your LambdaTest account. This login profile will help you store the values for respective login fields such as ID, E-mail, along with the submit button using the Locators.

What are locators?
Locators are used to find HTML elements of a web page in your automation test script. Selenium offers 8 locators to help you identify the particular HTML element you are looking for:

  1. ID
  2. Name
  3. TagName
  4. CSS Selector
  5. XPath
  6. Class Name
  7. Link Text
  8. Partial Link Text

How This Works?

A Login URL is feeded into the browser. This URL is going to be the one pointing towards the login page of the website your wish to test, and would be different from the Screenshot Test URL.

Then the locators(Username, Password, Submit button) specified by you for your login page are searched by the Screenshot driver. If all fields are correct your test will pass onto next stage, if fields are incorrect then the test is marked as fail.

Now, the form gets submitted and your browser will wait for the new page to render.

Finally, the Screenshot test URL is fed into the Screenshot driver, allowing it to start generating automated screenshots in bulk, on your desired test configurations.

Note: We recommend using your Login profile for a single test session before attempting multiple screenshots for cross browser testing.

Getting Started With Automated Screenshot After Login


To begin, we need to configure a login profile which would specify the website under test, locators, and login credentials. This is a one-time process. Without further ado, let’s configure the Login profile.

Login in to your LambdaTest account and go to Screenshot by clicking on the drop down for Visual UI testing from the left-navigation menu.

go to screenshot in Visual UI testing

Configure the Login profile by clicking on the Login button and selecting a New Login+.

click on login and select new login+

Provide The Login URL

A window would pop-up where you need to fill the details, starting from the Login URL. Kindly ensure that you provide the URL of the login page for the website under test. Now, hit next.

enter login URL

Provide The Locators

Select the locator as per your respective fields in the Login form.

selenium locators

For demonstration, let us capture the details for LambdaTest Login.

Note: If you are already logged in to LambdaTest, make sure to perform this drill in the incognito mode.

Step 1: Go to https://accounts.lambdatest.com/login. Right-click and select the option to open the inspection tools. For demonstration, we are using the Google Chrome’s Dev Tools.

inspect dev tools

Step 2: Click on the highlighted arrow to help you select any element on your page to inspect.

select an element on the page to inspect

Step 3: Now, click on the Email field in the login form and you will notice that the name locator is populated with the value ’email’.

email field

Step 4: Switch to your normal browser where you are logged into the LambdaTest application. Provide the Email field details in the Username Locators.

provide the username locator

Step 5: Switch back to incognito mode and inspect the password field in the LambdaTest login form.

inspect the password field

Step 6: Provide the Password field details in the Password Locators.

provide the password details

Step 7: Back to incognito mode, and inspect the Login button. Perform a right click on the piece of code highlighted for login button, go to copy, and click copy XPath.

login button details

Note: In the above demonstration, you will find the class name placed for the login button in the LambdaTest login. However, class name may be similar for multiple HTML elements located in a login form, so it is considered a best practice to copy the XPath for such scenarios.

Step 8: Now, on your normal browser, Select the XPath locator and paste the copied XPath for the Login button locator and hit next.

provide login button locator

Provide The Login Credentials

Under the credentials, provide your login details for the website you wish to test and hit next. For a demonstration, you can provide your LambdaTest login details.

login credentials

Save The Login Profile

When you are done configuring the Login URL, Locators, and Credentials for your web-application under test, you only need to provide a name to save this login profile.

save login profile

Once you hit the save button, you will find the below prompt indicating that the profile has been successfully created.

profile created

Kudos, you have successfully configured the Login profile. This profile will be saved in your LambdaTest account so the next time you need to run a similar test then all you would need is to enable the flag for this Login profile.

enable login profile

Running Automated Screenshot After The Login Page


Step 1: Login to LambdaTest and go to Screenshot Testing. Enable the flag for the profile you wish to test.

enable login profile

Step 2: Now, enter the Screenshot Test URL and hit the capture button. To carry out the above demonstration, we are making use of the Test URL: https://integrations.lambdatest.com/

provide screenshot test URL

Step 3: You will find all the screenshots generated for the web page that is accessible after login.

output for screenshot after login page in LambdaTest application.

Let us know in case you have any questions, drop us an email to support@lambdatest.com or simply give us a shout. We are here to help you speed your test suites 24/7. Happy testing! 🙂

Running Cucumber Scripts With TestNG And Selenium


LambdaTest Selenium Automation Grid is a cloud-based scalable Selenium testing platform which enables you to run your automation scripts on 2000+ different browsers and operating systems. You can now run your Cucumber scripts with TestNG and Selenium for automating your web application over a scalable Selenium infrastructure that is running real browsers and real operating systems.

This post will help you in getting started with configuring and running your Cucumber Java automation test scripts on LambdaTest Selenium cloud platform. In this post we would be exploring:

  • Prerequisites and Environment Setup.
  • Running your first Cucumber Java test.
  • Running your Cucumber scripts on locally hosted web application.

Prerequisites


Visit our GitHub repository for Cucumber and TestNG for finding all the relevant code samples.
  1. Global Dependencies
    • Make sure you have the latest Java installed in your system. For Windows, you can install it from their official website by clicking here.
    • For Linux, execute the following command in terminal.
    • For Mac, Java is installed by default on Mac OS X.
    • Install Maven from their official website. You could also use the below command for Homebrew.

  2. LambdaTest Authentication Credentials
  3. 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 Windows user:
    • set LT_USERNAME=”YOUR_USERNAME”
      set LT_ACCESS_KEY=”YOUR ACCESS KEY”

    • For macOS/Linux user:
    • export LT_USERNAME=”YOUR_USERNAME”
      export LT_ACCESS_KEY=”YOUR ACCESS KEY”

  4. Environment Setup
    • Ensure that the necessary packages are available by running the below command.
    • You may also want to run the command below to check for outdated dependencies. Please be sure to verify and review updates before editing your pom.xml file as they may not be compatible with your code.

Running Your First Cucumber Script For TestNG and Selenium


Here is the sample feature file for Cucumber.

Here is the TestRunner file to automate our feature file through Selenium using TestNG.

Below are the step definitions.

Open your cmd/terminal and route the pointer to Cucumber-TestNG-Sample.

Testing Locally Hosted or Privately Hosted Projects


You can test your locally hosted or privately hosted projects with LambdaTest Selenium grid cloud using Lambda Tunnel app. All you would have to do is set up an SSH tunnel using Lambda Tunnel app, and pass toggle tunnel = True via desired capabilities. Lambda Tunnel establishes a secure SSH protocol based tunnel that allows you in testing your locally hosted or privately hosted pages, even before they are made live.

Refer our LambdaTest Tunnel documentation for more information.

Here’s how you can establish Lambda Tunnel.

Download latest LambdaTest Tunnel binary file and extract it.

To run your Cucumber tests for locally hosted web applications you would need to set the Tunnel Capability flag to true

Important Note:

Some Safari & IE browsers, doesn’t support automatic resolution of the URL string “localhost”. Therefore if you test on URLs like “http://localhost/” or “http://localhost:8080” etc, you would get an error in these browsers. A possible solution is to use “localhost.lambdatest.com” or replace the string “localhost” with machine IP address. For example if you wanted to test “http://localhost/dashboard” or, and your machine IP is 192.168.2.6 you can instead test on “http://192.168.2.6/dashboard” or “http://localhost.lambdatest.com/dashboard”.

Breeze Integration


Breeze facilitates project management on-cloud through an intuitive platform, offering Gantt charts, kanban tool, task management, and time tracking to help you finish your release cycles on time. With Breeze, you can keep track of deadlines, an individual effort of your colleagues, and acknowledge who is doing what in a project.

LambdaTest integration with Breeze will help you log UI bugs or observations in your Breeze project as you perform cross browser testing on LambdaTest. You can capture a screenshot of your website over a browser discrepancy, highlight the UI bug, report that bug to your colleague, provide a summary of the issue, all from the middle of your test-session at LambdaTest. All of the details that you may mention around a bug would be auto-populated in your respective Breeze project.

How To Integrate Breeze With Your LambdaTest Account?


Step 1: Login to your LambdaTest account. You would need to have Admin or User level access to see and install integrations.

Step 2: Select ‘Integration’ from the left navigation menu bar. This will guide you to a screen where you will find a list of 3rd party applications, available to integrate with your LambdaTest account.

Step : Click on ‘Add’ under the block that says ‘Breeze’.

Breeze integration with LambdaTest

Step 4: You need to specify your API token for authenticating your LambdaTest account to your Breeze instance.

Breeze API token

Step 5: Go to your Breeze project and hit the profile image holder on top-right. Select the option for Personal settings & password.

Personal settings & password

Step 6: Select the tab for Integrations and copy the API token.

Copy API token from Integrations

What is an API token?

When two different applications interact with each other, a server-to-server communication is established. API token is needed for authenticating user identity from one server to another, by fetching user-owned resources available on the server from where the communication is initiated. API token has been a necessity for maintaining security and data integrity of any application. They are just as vital to an end user as they are to an application. API tokens are relevant if an end user logs in an application through a 2-step verification process.

Important Note: It is always a best practice to never share your API tokens, as someone else could authenticate a third-party application on your behalf and misuse it. In case you feel your API token for Breeze project is misplaced then don’t worry! Breeze allows your the option to regenerate the API token.

Step 7: Paste this API token while integrating Breeze from your LambdaTest account. Now, hit the Install button.

Paste API token on LambdaTest and hit Install

Step 8: Kudos! You have successfully integrated your LambdaTest account with Breeze your project.

Log Your First Bug Through LambdaTest Integration With Breeze


Step 1: Go for any of the test from the left navigation menu. For demo, we will be taking “Real Time Test” option.

Step 2: Present a URL of the web-app you need to test in the dialog box. After that, select any configuration for browser and operating system of your choice & hit ‘Start‘.

Real time test on LambdaTest

Step 3: After the VM is launched and operable. You can perform testing on your web-app for finding bugs. If a bug gets revealed, then you need to click on the Bug icon from the left panel for capturing a screenshot of the same. We have highlighted that option with yellow in the below image.

Click on bug icon to mark a bug

Step 4: After a screenshot is captured, you can annotate any issue or a task with an in-built image editor. Once you are done highlighting the bug, click on the button that says “Mark as Bug”.

click mark as bug

Step 5: After clicking on “Mark as Bug” button a form would open up. Fill the fields as per your requirement, and create the issue.

  • You can select your Breeze project.
  • Select the particular list in which you want to put your task.
  • Select an assignee.
  • Provide a name to your task.
  • Mention a description to relay important message around the UI observation.

Create issue
Note: After you click on “Create Bug”, you will be able to observe it being successfully marked through a single click effort. You will get prompt messages on top of your Virtual Machine indicating the progress of bug logging. After few seconds you will be notified with a prompt message “Bug successfully marked” indicating that the screenshot has been pushed to your Breeze project.

Step 6: Now, go to your Breeze project and you will notice your logged task under the specific list your assigned it through LambdaTest.

task created in Breeze

Step 7: As you click on the task. You will be able to find all the details you provided while marking the bug through LambdaTest. You would also find a URL routing to the screenshot you captured while cross browser testing using LambdaTest.

Remove LambdaTest Integration With Breeze


You can work with one integration at a time. So if you would want to integrate to a similar 3rd party application, then you would have to remove your current integration. Here is how you can do that.

Step 1: Login to your LambdaTest account.

Step 2: Select ‘Integrations’ from the left-navigation menu. This will guide you to a screen where you will find 3rd party applications, available to integrate with your LambdaTest account.

Step 3: Click on ‘REMOVE’. You can find the remove button right under the ‘Breeze’ block which would be highlighted with a green tick.

remove Breeze integration with LambdaTest

That was all you need to know for LambdaTest + Breeze Integration. Increase your productivity with our integrations. If you still have any questions for us, please feel free to let us know. Our experts are always available on chat to help you out with any roadblock regarding our product. Happy testing! 🙂

Zalenium Integration With LambdaTest


Brought up by Zalando, Zalenium is open-source with the vision to eliminate the hassle of maintaining an in-house Selenium Grid. Zalenium does so by offering a Docker-based Selenium Grid on-cloud which gets auto-updated with latest browsers, along with their driver versions.

Continue reading Zalenium Integration With LambdaTest

npm Plugin For TestCafe Integration With LambdaTest


TestCafe offers a comprehensive, and extensive platform to perform End-to-End tests for node.js applications. It supports both JavaScript and Typescript, so you can write tests in either one of the two. With TestCafe, you can create stable tests which are easy to integrate with your continuous integration process. You can also execute multiple test cases in parallel.

LambdaTest, a cloud-based, cross browser testing platform is out with an npm plugin that would allow you to integrate TestCafe with your LambdaTest account. That way, you can expand your test coverage using LambdaTest Selenium Grid of 2000+ real browsers, and browser versions running across various operating systems for mobile, desktop, and tablets. Similar to TestCafe, LambdaTest Selenium Grid also allows you to perform parallel testing.

Prerequisites


Important: Visit LambdaTest npm package for TestCafe.

  • Make sure you have your TestCafe Credentials.
  • 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.

    • For Linux/Mac:
    • For Windows:

Install LambdaTest npm For TestCafe


Use the below command for installing the npm to integrate LambdaTest with TestCafe.

How To Use npm Plugin For LambdaTest & TestCafe Integration?

To acknowledge all available browsers aliases offered by LambdaTest Selenium Grid, type the below command:

To execute the test from cmd/terminal by declaring the browsers and operating systems to test:

If you are using API, then you need to declare the aliases inside your browser() method:

Additional Configuration Parameters


In case you wish to make some additional configurations to your automation test scripts then you can incorporate the below variables:

Variable Description
LT_TEST_NAME To specify a name to your test on LambdaTest Selenium Grid.
LT_BUILD To specify a name to your build on LambdaTest Selenium Grid.
LT_CAPABILITY_PATH To specify the path of a JSON file that declares additional Desired Capabilities. Here, Chrome@63.0:Windows 8.1 represents browser alias.
LT_RESOLUTION to perform cross browser testing on a specific screen resolution in the ${width}x${height} format.
LT_LOGFILE Presents detailed logs of your automation script execution. Provide a specific path to this file. If you won’t provide a path then the logs would be saved in your present working directory by the filename: tunnel.log.
LT_VERBOSE Set flag for verbose to either true or false
LT_PROXY_HOST A mandatory variable if you wish to perform cross browser testing through proxy. This variable is where you need to declare the hostname/IP of proxy.
LT_PROXY_PORT Port of the proxy. Default value for proxy port would be 3128.
LT_PROXY_USER Username for connecting to proxy, mandatory value for using ‘proxypass’.
LT_PROXY_PASS Password for the USERNAME option.
LT_TUNNEL_NAME Human readable tunnel identifier (Name of the tunnel).
LT_DIR Path of the local folder you want to test.
LT_SELENIUM_VERSION Browser specific capability
LT_CONSOLE Set flag as true or false.
LT_NETWORK Set flag as true or false.
LT_VIDEO Set flag as true or false.
LT_SCREENSHOT Set flag as true or false.
LT_TIMEZONE Configure tests to run on a custom time zone.

Example

Bitbucket Pipelines Integration With LambdaTest


Bitbucket Pipelines offers a free, automated continuous integration service through Bitbucket cloud servers. With Bitbucket Pipelines teams can ship their product faster as they could rapidly test their code as soon as they commit. Once the code is tested, Bitbucket Pipeline deploys it into the Production environment automatically. It does so with the help of containers that can be fully customized according to your project requirements.

LambdaTest integration with Bitbucket Pipelines will help you perform cross browser testing on 2000+ real browsers & browser versions, through a Selenium Grid hosted on LambdaTest cloud servers. All you need is to set up your Bitbucket Pipelines with your LambdaTest account & you can trigger tests onto LambdaTest, directly from your Bitbucket Pipelines.

In this topic, you will learn about the:

  • Prerequisites
  • Setup for integrating LambdaTest with Bitbucket Pipelines
  • Parallel execution on LambdaTest Selenium Grid

Prerequisites


Important: Visit LambdaTest GitHub repository for Bitbucket Pipelines.

  • Make sure you have your Bitbucket Credentials.
  • 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.

    • For Linux/Mac:
    • For Windows:

Integrating LambdaTest With Bitbucket Pipelines


Step 1: Login to your Bitbucket account. Go to repositories & import the LambdaTest Git repository for Bitbucket Pipelines. You will be facing the below screen after import is successful.

after import screen

Step 2: After importing the Git repository, fetch the yml file to run your automation tests using Protractor framework on LambdaTest Selenium Grid.

Step 3: Now, you need to add LambdaTest envrionment variables into your Bitbucket pipelines. These envrionment variables will help to authenticate you test before they are executed on LambdaTest Selenium Grid. Go to Settings General Username aliases Repository variables.

LambdaTest Environment Variables

Step 4: After adding the environment variables, you need to visit your pipeline & click on Rerun.

Go to pipelines & hit rerun

Step 5: Run the below command to execute a test on LambdaTest Selenium Grid.

You will find the below log generated:

> protractor-lambdatest@0.1.0 single /opt/atlassian/pipelines/agent/build
> protractor conf/single.conf.js
[10:23:53] I/launcher - Running 1 instances of WebDriver
[10:23:53] I/hosted - Using the selenium server at https://LT_USERNAME:LT_ACCESS_KEY@hub.lambdatest.com/wd/hub
Started
.
1 spec, 0 failures
Finished in 7.713 seconds
[10:24:10] I/launcher - 0 instance(s) of WebDriver still running
[10:24:10] I/launcher - chrome67.0 #01 passed

Running Tests In Parallel On LambdaTest Selenium Grid


LambdaTest Selenium Grid will help you execute multiple test cases in parallel. You can run a single test scenario over numerous browsers + OS combinations, simultaneously. You could also run different test cases in a similar browser + OS combinations. This would significantly trim down the time taken on your cross browser testing activities.

For running test in parallel, replace the run command from single to parallel as you update the pipeline’s yml file.

Replace: npm run single
With: npm run parallel

Using Environment Variables For Authentication Credentials


In order to provide you with a secure cross browser testing environment on-cloud, we recommend you to integrate LambdaTest Authentication Credentials in your test scripts. This would allow our cloud servers to establish a secure connection between your local system & our cloud-based Selenium Grid. This document will help you understand how to set up your LambdaTest authentication credentials as environment variables for your respective operating system. This set up would also help authenticate your colleague’s test cases when executed against an individual account.

Where To Find LambdaTest Authentication Credentials?


LambdaTest Authentication Credential consists 2 fields:

  1. LambdaTest Username
  2. LambdaTest Access Key

You can find these authentication credentials by either visiting the Automation Dashboard or your LambdaTest Profile.

Fetching Authentication Credential from the Automation Tab


Step 1: Visit the Automation tab from the left navigation menu.

Step 2: Click on the key icon from the right side of your screen and copy the Access Key and Username.

key icon for environment variables

Fetching Authentication Credential from your LambdaTest Profile


Step 1: Visit your LambdaTest Profile by clicking on the user icon on the top-right & going to Profile.

Click User Icon and go to Profile

Step 2: You will find your Username & Access Key.

LambdaTest Profile

Configuring Environment Variables on Mac OSX/Linux Systems


Step 1: Open your terminal mode, and provide the command vi ~/.bash_profile & hit Enter.

Step 2: To perform text-insertion into your profile, you would need to press the i button from your keyboard.

Step 3: Feed LambdaTest Authentication credentials using the below:

Step 4: Hit Esc once you have entered the above lines into your Profile.

Step 5: Long-press the Shift button & hit Z twice (z z) to save your file and quit vi.

Step 6: Enter source ~/.bash_profile into the terminal.

Configuring Environment Variables on Windows Operating Systems


Step 1: Right-click on the Computer icon to access your Computer Properties. You could also follow the path(Control Panel\All Control Panel Items\System) into your computer address bar.

Step 2: Go-to Advanced system settings & click on Environment Variables.

environment variables from Advanced System Settings.

Step 3: You will notice a dialog would prompt open for the Environment Variables. Now, click on New under the System variables.

Step 4: Enter LT_USERNAME as the Variable name & provide your LambdaTest Username as the Variable value.

Step 5: Hit Ok & repeat the steps for adding LambdaTest Access Key as another System Envrionment Variable.

Incorporating Environment Variable In Selenium Automation Scripts

Now that we have set up our LambdaTest Authentication Credentials as System Environment Variables, we need to incorporate them in our Selenium automation scripts for invoking your automation test suites on LambdaTest Selenium Grid. In this section, you will learn how to reference environment variables for different programming languages with respect to LambdaTest Selenium Grid.

Java


  • For JUNIT & TestNG:

Python


  • For PyTest & unittest:

NodeJS


  • For Mocha-Chai & Jasmine-Chai:
  • For Protractor-Jasmine:

Ruby


  • For RSpec:

C#


  • For NUnit:

PHP


  • For Behat:

Automated Screenshot API For Cross Browser Testing


Automated Screenshot API will help you capture full-page screenshots of any URL by invoking an API call to LambdaTest cloud servers. You can ensure cross browser compatibility of your website stays in check by performing bulk screenshot testing on a regular basis. You can do that without logging into LambdaTest, by executing a JSON file in your preferred API development environment such as Postman.

This document will help you leverage LambdaTest Automated Screenshot. You would learn how to:

  • Fetch all OS + Browser combinations.
  • Fetch all Screen Resolutions.
  • Fetch Screenshots of an already performed test session.
  • Start a Screenshot Test Session
    1. Test your locally hosted web pages.
    2. Test web pages with basic authentication.
    3. Test web pages with a Callback URL.
  • Stop a Screenshot test.

Prerequisites


  • 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.

    • 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}

Fetch All OS + Browser Combinations


The below GET request will help you extract a list of all the combinations for (OS + Browser) offered by LambdaTest. You can download these combinations as a JSON file.

Requested URL:

Client URL would be as followed:

As you execute, you will find the Server response presented below.

Fetch Every Screen Resolutions


To get a list of all the available screen resolutions provided by LambdaTest for you to perform cross browser testing, you would need to execute the below GET request. The GET request will help you extract the respective response from our cloud servers in a JSON format.

Requested URL:

Client URL would be as followed:

As you execute, you will find the Server response presented below.

Fetch Details Of An Executed Test Session


In case you wish to fetch all the details from an already executed screenshot test session. These details will help you analyze the results of your screenshot test session at LambdaTest. You would get the below details:

  • Test Details:
    1. Test ID
    2. Test status
    3. Defer time
    4. Tested URL
    5. Callback URL(if any)
  • Screenshot Details:
    1. Operating System
    2. Browser
    3. Browser Version
    4. Status
    5. Screenshot URL
    6. Thumbnail URL
    7. Activity ID
    8. Resolution

Requested URL:

Note: Test ID is a mandatory field for making use of this GET request. This would fetch details in JSON format for all bulk screenshots captured in a test session specified by you.

Client URL would be:

Example Value:

Run A Screenshot Test


To start a screenshot test using the API, you would need to trigger the below POST request.

Client URL would be as followed:

Example value:

Screenshot Testing For Locally Hosted Web Applications


To perform a screenshot test on your locally hosted web applications, you would need to declare the below parameter in your request before specifying the configurations:

"tunnel": true

Example Value:

Screenshot Test With Basic Authentication


Similarly, to perform a screenshot test on a web application with basic authentication, you would need to declare the below parameter in your request before specifying the configurations.

Example:

Route Test Details To Your Colleagues Through A Callback URL


By specifying a Callback URL, you can route your test details to a specific IP, or a specific URL. This would help you to share your test results with your colleagues or to keep them on a specific URL, so you could come back and assess these results when you have time. To invoke a Callback URL, you would need to declare the below parameter in your request before specifying the configurations.

Example Value:

Stop A Screenshot Test


In case you wish to stop a screenshot test, you can do so with the help of a PUT request. Test ID is again mandatory over here as you need to convey which particular screenshot test would you want to be aborted.

Requested URL:

Note: This will terminate only a running test session. Providing a TestID of an already completed test session will provide you with a 404 error as the server response.

Ranorex Integration With LambdaTest


Ranorex is a GUI test automation framework which helps to execute E2E(End-to-End) testing of web, desktop, and mobile applications. Ranorex Core API is powered with Selenium WebDriver helping you to maximize your cross browser testing in an efficient manner.

Selenium, as we know, has 4 variants, RC, IDE, WebDriver, & Grid. Selenium IDE is built with the purpose of facilitating automated record-and-replay testing over Mozilla Firefox browsers. However, ever since Mozilla Firefox released its version 55, the IDE’s compatibility got disrupted and isn’t replaced till now. Ranorex helps you to overcome this scenario by optimizing their Core API in such manner that users of Selenium WebDriver could get to unleash the full potential of all Selenium variants irrespective of browser updates.

LambdaTest offers integration with Ranorex to help you perform automated cross browser testing of your web app on over 2000+ real browsers & browser versions through an on-cloud Selenium Grid. You could perform tests on your locally hosted files and can execute parallel testing to trim down your test cycles drastically.

In this topic, we will demonstrate how to set up your Selenium Server using Ranorex, and how to connect it to LambdaTest cloud-based Selenium Grid. You will be going through the below sections:

Getting Started With Ranorex


Step 1: Open Ranorex & click on “New solution via wizard” from the left menu.

New solution via wizard

Step 2: Select the method for Web testing over different browsers. Then hit on the button that says “Click here”.

Select web

Step 3: Provide the Solution name & Location where you wish to store the new solution & hit continue.

solution name & location

Step 4: Specify the test URL and browsers on which you wish to perform cross browser testing.

Select test URL & browser

Step 5: Select your recording behaviour as “Do not use whitelisting”.

don't whitelist

Step 6: And you are done creating your new test automation solution. Now, you can finish the wizard.

finish

Setting Up WebDriver Endpoint For LambdaTest Selenium Grid


Step 1: After successfully creating a solution, you will notice that a default test suite would be configured in Ranorex.

default test suite

Step 2: Add the end point to run the test suite on Selenium Grid offered by LambdaTest. You can do so by going to the tab for “Endpoint” Select WebDriver Provide an Endpoint name & Address(Hub URL). Click on Add endpoint.

Note: You can check your connection by clicking on Test connection.

Add end point for Selenium Grid

Step 3: You have successfully setup a WebDriver endpoint for LambdaTest Selenium Grid Hub URL.

LambdaTest Hub-URL added as a WebDriver endpoint

Note: You need to select this WebDriver endpoint to perform automated cross browser testing on 2000+ real browsers & browser versions using the LambdaTest Selenium Grid.

Performing Cross Browser Testing On LambdaTest Selenium Grid Through Ranorex


Step 1: After successful addition of LambdaTest Selenium Grid Hub-URL, comes the time to perform cross browser testing. For browser compatibility testing, you would need to open you test suite and select the particular browser you wish to run your test on.

Select browser to run

Note: In order to run your test on a browser which is not present in the drop-down, you would need to add a new variable for that browser. For example, if you wish to perform cross browser testing on Safari browser then you can implement it with the help of below variables:
Variable name- Mac
Variable value – Safari

Step 2: Now, under the tab “Endpoint”, you need to add a new configuration to set up the DesiredCapabilities for LambdaTest Selenium Grid.

Add new endpoint for DesiredCapabilities

Step 3: Fetch your DesiredCapabilities from LambdaTest Selenium Capability Generator.

Selenium DesiredCapabilities Generator

Step 4: Copy the DesiredCapabilities & add them in Endpoint configurations by placing them in “Capabilities JSON”. Don’t forget to provide a name as well.

Add new configuration

Step 5: Now, from the drop-down for Active configuration, select the latest configuration you added.

active configurations

Step 6: Now, go to recording tab & add new actions after clicking the Record button.

Keep in mind, to choose the Endpoint as Admin localhost while recording the test cases.

add new actions

Step 7: You will find your actions being recorded in the Ranorex interface.

recording actions

Important: Once you are finished recording you actions, LambdaTest recommends you to choose the repository item in the same instance where you recording is halted. This would help you to avoid any time out issue.

avoid timeout

Step 8: After you are done configuring the open browser, recording, & close browser file, come back to your test-suite & ensure that you have WebDriver set as an Endpoint to run the test on LambdaTest.

Set WebDriver endpoint

Step 9: Hit the run button. You will notice two output screens. One on the right side, is displaying the running test case. And on the left side, you can see that the test ran on the specific configuration that you chose under Active configuration drop-down, along with all the the steps you recorded.

run your test

Step 10: Kudos! You have successfully performed automated cross browser testing on LambdaTest Selenium Grid from your Ranorex instance. You can confirm the text execution on your LambdaTest account. You could also find all the test details such as metadata, network logs, command logs, Selenium logs, command-by-command screenshot, and more on the LambdaTest dashboard. You can also extract these details using our LambdaTest Selenium Automation API. Happy testing! 🙂

AWS CodePipeline Integration With LambdaTest


AWS CodePipeline is a cloud-based continuous delivery platform for fully automating your release pipelines. Provides an intuitive interface for configuring & modelling different stages of release cycles, so you could envision how your code changes would look when pushed across these different changes. You can also track your pipeline in real-time, you could also look into the pipeline history to understand the timestamps involved in the execution of various pipelines.

LambdaTest integration with AWS CodePipeline will help you perform automated cross browser testing through a Selenium Grid offering 2000+ real browsers, browser versions. Now, not only can you commit changes to your code using AWS CodePipeline, but you can also validate any UI/UX anomalies of your web application through a wide variety of browsers using LambdaTest, a cloud-based cross browser testing tool.

Prerequisite


  1. Login details in AWS CodePipeline CI.
  2. A GitHub repository. Here is our sample GitHub repository for AWS CodePipeline.
  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 Your LambdaTest Account With AWS CodePipeline


Step 1: Login to your AWS CodePipeline instance. Visit the Pipelines page and create a new pipeline.

create-pipeline

Step 2: Set your pipeline settings for a new service role.

choose pipeline settings

Step 3: Now, provide your git details in the next step to Add Source Stage.

Provide Git details

Step 4: Follow the steps in AWS CodePipeline & fill the form page on the next step to Add build stage.

add build stage in AWS CodePipeline

Step 5: Create a new build project while adding a Build Stage.

create a new project

Step 6: Choose a Deploy Provider on deploy stage screen and click on Next.

Choose a Deploy Provider

Note: Find the sample code from our GitHub repository for AWS CodePipeline.

Step 7: Start a build and pull the codes from Git. Read the below buildspec.yml from your project’s root directory.

Step 8: Monitor your test being triggered on the LambdaTest platform. You will observe the below output generated.

Kudos! Now, you can rapidly commit changes and validate them for UI/UX anomalies by executing automated cross browser testing using LambdaTest Selenium Grid. Happy Testing! 🙂