Skip to content

Commit d943fa1

Browse files
committed
Restructured Readme
1 parent 63d22f3 commit d943fa1

File tree

3 files changed

+59
-40
lines changed

3 files changed

+59
-40
lines changed

.project

+11
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,15 @@
2020
<nature>org.eclipse.jdt.core.javanature</nature>
2121
<nature>org.eclipse.m2e.core.maven2Nature</nature>
2222
</natures>
23+
<filteredResources>
24+
<filter>
25+
<id>1643911286853</id>
26+
<name></name>
27+
<type>30</type>
28+
<matcher>
29+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30+
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31+
</matcher>
32+
</filter>
33+
</filteredResources>
2334
</projectDescription>

README.md

+48-40
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,57 @@
1-
# Java TestNG Selenium
2-
3-
### Environment Setup
4-
5-
1. Global Dependencies
6-
* Install [Maven](https://maven.apache.org/install.html)
7-
* Or Install Maven with [Homebrew](http://brew.sh/) (Easier)
8-
```
9-
$ install maven
10-
```
11-
2. Project Dependencies
12-
* checkout the repository
13-
* Check that packages are available
1+
# Java-TestNG-Selenium-Sample
2+
![Geb](https://www.lambdatest.com/support/assets/images/og-images/TestNG-framework-Selenium.jpg)
3+
4+
### Prerequisites
5+
1. Install and set environment variable for java.
6+
* Windows - https://www.oracle.com/java/technologies/downloads/
7+
* Linux - ``` sudo apt-get install openjdk-8-jre ```
8+
* MacOS - Java should already be present on Mac OS X by default.
9+
2. Install and set environment varibale for Maven.
10+
* Windows - https://maven.apache.org/install.html
11+
* Linux/ MacOS - [Homebrew](http://brew.sh/) (Easier)
1412
```
15-
$ cd Java-TestNG-Selenium
13+
install maven
1614
```
17-
* 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.
18-
```
19-
$ mvn versions:display-dependency-updates
20-
```
21-
22-
**LambdaTest Authentication Credentials:** Make sure you have your LambdaTest credentials with you to run test automation scripts with Jest on LambdaTest Selenium Grid. You can obtain these credentials from the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/) or through [LambdaTest Profile](https://accounts.lambdatest.com/detail/profile).
23-
24-
Set LambdaTest Username and Access Key in environment variables.
25-
26-
* For Linux/macOS:
27-
`export LT_USERNAME="YOUR_USERNAME"
28-
export LT_ACCESS_KEY="YOUR ACCESS KEY"`
29-
30-
* For Windows:
31-
`set LT_USERNAME="YOUR_USERNAME"
32-
set LT_ACCESS_KEY="YOUR ACCESS KEY"`
3315
34-
### Running Tests
35-
16+
### Run your First Test
17+
1. Clone the Java-TestNG-Selenium repository.
3618
```
37-
To run single test
38-
$ mvn test -D suite=single.xml
39-
40-
To run parallel test
41-
42-
$ mvn test -D suite=parallel.xml
43-
19+
git clone https://github.com/LambdaTest/Java-TestNG-Selenium
20+
```
21+
2. Next get into Java-TestNG-Selenium folder, and import Lamabdatest Credentials. You can get these from lambdatest automation dashboard.
22+
<p align="center">
23+
<b>For Linux/macOS:</b>:
24+
25+
```
26+
export LT_USERNAME="YOUR_USERNAME"
27+
export LT_ACCESS_KEY="YOUR ACCESS KEY"
28+
```
29+
<p align="center">
30+
<b>For Windows:</b>
4431
4532
```
46-
## About LambdaTest
33+
set LT_USERNAME="YOUR_USERNAME"
34+
set LT_ACCESS_KEY="YOUR ACCESS KEY"
35+
```
36+
Step 3. Make sure to install the mandatory Selenium dependencies for Maven by running the below command.
37+
```
38+
mvn compile
39+
mvn versions:display-dependency-updates
40+
```
41+
### Run Single Test
42+
Use the command below from the root of the project to run single tests.
43+
```
44+
mvn test -D suite=single.xml
45+
```
46+
### Run Parallel Test
47+
Use the command below from the root of the project to run parallel tests.
48+
```
49+
mvn test -D suite=parallel.xml
50+
```
51+
### Results
52+
You can check the test results on LambdaTest [Automation Dashboard](https://automation.lambdatest.com/build)
53+
![Automation Dashboard](https://github.com/LambdaTest/Java-TestNG-Selenium/dashboard.png)
4754
55+
## About LambdaTest
4856
[LambdaTest](https://www.lambdatest.com/) is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your [selenium automation testing](https://www.lambdatest.com/selenium-automation) to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
4957

dashboard.png

167 KB
Loading

0 commit comments

Comments
 (0)