Skip to content

Commit 68c8d1a

Browse files
updating cucumber - seleniu,
1 parent 2a3e3bb commit 68c8d1a

File tree

1 file changed

+25
-37
lines changed

1 file changed

+25
-37
lines changed

docs/cucumber-script-testng-selenium.md

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: cucumber-script-testng-selenium
3-
title: Execute Selenium Tests With Cucumber
3+
title: Run your Selenium Cucumber tests on LambdaTest
44
sidebar_label: Cucumber
55
description: Your guide to running tests using Cucumber on LambdaTest's Selenium Grid of 3000+ real devices and desktop browsers.
66
keywords:
@@ -44,57 +44,45 @@ import TabItem from '@theme/TabItem';
4444
})
4545
}}
4646
></script>
47+
This guide walks you through the process of running Selenium Cucumber tests on LambdaTest, a cloud-based cross-browser testing platform. By following these steps, you can seamlessly execute automated tests on a wide range of browsers and operating systems using LambdaTest’s Selenium Grid.
4748

48-
# Selenium Cucumber Testing Tutorial
49-
50-
---
51-
52-
In this topic, you will learn how to configure and run tests using **Cucumber** on LambdaTest's [Selenium testing cloud platform](https://www.lambdatest.com/selenium-automation).
53-
54-
## Objectives
55-
56-
---
57-
58-
By the end of this topic, you will be able to:
49+
## Prerequisites
50+
Before you begin, ensure you have the following:
5951

60-
1. Set up an environment for testing your hosted web pages using **Cucumber** framework with **TestNG** and **Selenium**.
61-
2. Understand and configure the core capabilities required for your Selenium test suite.
62-
3. Test your locally hosted pages on LambdaTest platform.
63-
4. Explore advanced features of LambdaTest.
52+
- Your [LambdaTest Username and Access Key](https://accounts.lambdatest.com/)
53+
- Install Java Development Kit (JDK). We recommend Java version 11
54+
- Install [Maven](https://maven.apache.org/)
55+
- [Download](https://www.selenium.dev/downloads/) the latest Selenium Client and its WebDriver bindings
6456

57+
## Step 1: Configure your test suite
6558
:::tip Sample repo
59+
Download or Clone the code sample for the Cucumber from the LambdaTest GitHub repository to run the tests on our Standard Grid.
6660

67-
All the code samples in this documentation can be found on **LambdaTest's Github Repository**. You can either download or clone the repository to quickly run your tests. <a href="https://github.com/LambdaTest/cucumber-testng-sample" className="github__anchor"><img loading="lazy" width="50" height="50" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub</a>
68-
61+
<a href="https://github.com/LambdaTest/cucumber-testng-sample" className="github__anchor" target="_blank"><img loading="lazy" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub</a>
6962
:::
7063

71-
## Prerequisites
72-
73-
---
74-
75-
Before you can start performing Java automation testing with Selenium, you would need to:
76-
77-
- Install the latest **Java development environment**. We recommend to use **Java 11** version.
78-
79-
- Download the latest **Selenium Client** and its **WebDriver bindings** from the [official website](https://www.selenium.dev/downloads/). Latest versions of Selenium Client and WebDriver are ideal for running your automation script on LambdaTest Selenium cloud grid.
80-
81-
- Install **Maven**. It can be downloaded and installed following the steps from [the official website](https://maven.apache.org/). Maven can also be installed easily on **Linux/MacOS** using [**Homebrew**](https://brew.sh/) package manager.
82-
83-
### Cloning Repo and Installing Dependencies
64+
```bash title="terminal"
65+
git clone https://github.com/LambdaTest/cucumber-testng-sample.git
66+
cd cucumber-testng-sample
67+
```
8468

85-
**Step 1:** Clone the LambdaTest’s [cucumber-testng-sample](https://github.com/LambdaTest/cucumber-testng-sample) repository and navigate to the code directory as shown below:
69+
If you are using your own project, make sure you update the **Hub endpoint** in your tests file. By setting up the Hub endpoint, you establish the communication channel between your tests and the browser nodes, enabling effective test distribution and execution.
8670

87-
```bash
88-
git clone https://github.com/LambdaTest/cucumber-testng-sample
89-
cd cucumber-testng-sample
71+
```java title="Test.java"
72+
public static String hubURL = "https://hub.lambdatest.com/wd/hub";
9073
```
9174

92-
You may also want to run the command below to check for outdated dependencies.
75+
## Step 2: Update the dependencies
76+
Run the command below to check for outdated dependencies. Review updates carefully before modifying your `pom.xml`, as they might not be compatible with your code.
9377

94-
```bash
78+
```bash title="terminal"
9579
mvn versions:display-dependency-updates
9680
```
9781

82+
```xml reference
83+
https://github.com/LambdaTest/cucumber-testng-sample/blob/master/pom.xml
84+
```
85+
9886
### Setting up your Authentication
9987

10088
Make sure you have your LambdaTest credentials with you to run test automation scripts on LambdaTest Selenium Grid. You can obtain these credentials from the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build) or through [LambdaTest Profile](https://accounts.lambdatest.com/login).

0 commit comments

Comments
 (0)