Skip to content

Commit 877ddd3

Browse files
authored
Merge pull request #5 from likith-lt/master
code fixes
2 parents 71eae1d + 1d41710 commit 877ddd3

File tree

4 files changed

+43
-50
lines changed

4 files changed

+43
-50
lines changed

README.md

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# JUnit With Appium ![pw](https://img.shields.io/badge/Junit5-25A162?style=for-the-badge&logo=junit5&logoColor=white)
1+
# JUnit With Appium ![pw](https://img.shields.io/badge/Junit5-25A162?style=for-the-badge&logo=junit5&logoColor=white)
22

33
<p align="center">
44
<img height="500" src="https://user-images.githubusercontent.com/95698164/171858482-4986e439-2a31-4947-91e7-93fa9eae7652.png">
@@ -21,17 +21,17 @@
2121
&emsp;
2222
&emsp;
2323

24-
*JUnit is a popular unit testing framework for Java, and was an important part of test-driven development. It belongs to a family of unit testing frameworks known as xUnit. Perform [JUnit test on LambdaTest's online cloud](https://www.lambdatest.com/appium-mobile-testing).*
24+
_JUnit is a popular unit testing framework for Java, and was an important part of test-driven development. It belongs to a family of unit testing frameworks known as xUnit. Perform [JUnit test on LambdaTest's online cloud](https://www.lambdatest.com/appium-mobile-testing)._
2525

26-
*Learn the basics of [Appium testing on the LambdaTest platform](https://www.lambdatest.com/support/docs/getting-started-with-appium-testing/).*
26+
_Learn the basics of [Appium testing on the LambdaTest platform](https://www.lambdatest.com/support/docs/getting-started-with-appium-testing/)._
2727

2828
[<img height="53" width="200" src="https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png">](https://accounts.lambdatest.com/register)
2929

3030
## Table of Contents
3131

32-
* [Pre-requisites](#pre-requisites)
33-
* [Run Your First Test](#run-your-first-test)
34-
* [Executing The Test](#executing-the-test)
32+
- [Pre-requisites](#pre-requisites)
33+
- [Run Your First Test](#run-your-first-test)
34+
- [Executing The Test](#executing-the-test)
3535

3636
## Pre-requisites
3737

@@ -60,10 +60,10 @@ Set LambdaTest `Username` and `Access Key` in environment variables.
6060
export LT_USERNAME="YOUR_LAMBDATEST_USERNAME" \
6161
export LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"
6262
```
63-
64-
**For Windows:**
65-
66-
```bash
63+
64+
**For Windows:**
65+
66+
```bash
6767
set LT_USERNAME="YOUR_LAMBDATEST_USERNAME" `
6868
set LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"
6969
```
@@ -80,7 +80,7 @@ Upload your **_iOS_** application (.ipa file) or **_android_** application (.apk
8080
curl -u "YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY" \
8181
--location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \
8282
--form 'name="Android_App"' \
83-
--form 'appFile=@"/Users/macuser/Downloads/proverbial_android.apk"'
83+
--form 'appFile=@"/Users/macuser/Downloads/proverbial_android.apk"'
8484
```
8585

8686
**For Windows:**
@@ -115,7 +115,7 @@ curl -u "YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY" -X POST "https://m
115115

116116
Once you are done with the above-mentioned steps, you can initiate your first JUnit test on LambdaTest.
117117

118-
**Test Scenario**: Check out [android.java](https://github.com/LambdaTest/LT-appium-java-junit/blob/master/src/test/java/com/lambdatest/android.java) file to view the sample test script for android and [ios.java](https://github.com/LambdaTest/LT-appium-java-junit/blob/master/src/test/java/com/lambdatest/ios.java) for iOS.
118+
**Test Scenario**: Check out [android.java](https://github.com/LambdaTest/LT-appium-java-junit/blob/master/src/test/java/com/lambdatest/android.java) file to view the sample test script for android and [ios.java](https://github.com/LambdaTest/LT-appium-java-junit/blob/master/src/test/java/com/lambdatest/ios.java) for iOS.
119119

120120
### Configuring Your Test Capabilities
121121

@@ -183,15 +183,15 @@ The tests can be executed in the terminal using the following command:
183183
<TabItem value="android-exec" label="Android" default>
184184

185185
```bash
186-
mvn test android.java
186+
mvn test -P android
187187
```
188188

189189
</TabItem>
190190

191191
<TabItem value="ios-exec" label="iOS" default>
192192

193193
```bash
194-
mvn test ios.java
194+
mvn test -P ios
195195
```
196196

197197
</TabItem>
@@ -207,44 +207,42 @@ mvn test ios.java
207207

208208
## Documentation & Resources :books:
209209

210-
211210
Visit the following links to learn more about LambdaTest's features, setup and tutorials around test automation, mobile app testing, responsive testing, and manual testing.
212211
213-
* [LambdaTest Documentation](https://www.lambdatest.com/support/docs/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-java-junit)
214-
* [LambdaTest Blog](https://www.lambdatest.com/blog/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-java-junit)
215-
* [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-java-junit)
212+
- [LambdaTest Documentation](https://www.lambdatest.com/support/docs/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-java-junit)
213+
- [LambdaTest Blog](https://www.lambdatest.com/blog/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-java-junit)
214+
- [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-java-junit)
216215
217216
## LambdaTest Community :busts_in_silhouette:
218217
219218
The [LambdaTest Community](https://community.lambdatest.com/) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎
220219
221220
## What's New At LambdaTest ❓
222221

223-
To stay updated with the latest features and product add-ons, visit [Changelog](https://changelog.lambdatest.com/)
224-
222+
To stay updated with the latest features and product add-ons, visit [Changelog](https://changelog.lambdatest.com/)
223+
225224
## About LambdaTest
226225

227-
[LambdaTest](https://www.lambdatest.com) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.
226+
[LambdaTest](https://www.lambdatest.com) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.
228227

229228
### Features
230229

231-
* Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.
232-
* Real-time cross browser testing on 3000+ environments.
233-
* Test on Real device cloud
234-
* Blazing fast test automation with HyperExecute
235-
* Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.
236-
* Smart Visual Regression Testing on cloud
237-
* 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.
238-
* Automated Screenshot testing across multiple browsers in a single click.
239-
* Local testing of web and mobile apps.
240-
* Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.
241-
* Geolocation testing of web and mobile apps across 53+ countries.
242-
* LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports
243-
230+
- Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.
231+
- Real-time cross browser testing on 3000+ environments.
232+
- Test on Real device cloud
233+
- Blazing fast test automation with HyperExecute
234+
- Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.
235+
- Smart Visual Regression Testing on cloud
236+
- 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.
237+
- Automated Screenshot testing across multiple browsers in a single click.
238+
- Local testing of web and mobile apps.
239+
- Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.
240+
- Geolocation testing of web and mobile apps across 53+ countries.
241+
- LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports
242+
244243
[<img height="53" width="200" src="https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png">](https://accounts.lambdatest.com/register)
245244

246-
247245
## We are here to help you :headphones:
248246

249-
* Got a query? we are available 24x7 to help. [Contact Us](support@lambdatest.com)
250-
* For more info, visit - [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-java-junit)
247+
- Got a query? we are available 24x7 to help. [Contact Us](support@lambdatest.com)
248+
- For more info, visit - [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=LT-appium-java-junit)

pom.xml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
53
<modelVersion>4.0.0</modelVersion>
64

75
<groupId>com.lambdatest</groupId>
86
<artifactId>lambdatest-junit-sample</artifactId>
97
<version>1.0-SNAPSHOT</version>
108

119

12-
13-
14-
1510
<properties>
1611
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1712
<surefire.version>2.19.1</surefire.version>
@@ -78,15 +73,15 @@
7873
<profiles>
7974

8075
<profile>
81-
<id>parallel</id>
76+
<id>ios</id>
8277
<build>
8378
<plugins>
8479
<plugin>
8580
<groupId>org.apache.maven.plugins</groupId>
8681
<artifactId>maven-surefire-plugin</artifactId>
8782
<configuration>
8883
<includes>
89-
<include>com/lambdatest/JUnitConcurrentTodo.java</include>
84+
<include>com/lambdatest/ios.java</include>
9085
</includes>
9186
</configuration>
9287
</plugin>
@@ -95,15 +90,15 @@
9590
</profile>
9691

9792
<profile>
98-
<id>single</id>
93+
<id>android</id>
9994
<build>
10095
<plugins>
10196
<plugin>
10297
<groupId>org.apache.maven.plugins</groupId>
10398
<artifactId>maven-surefire-plugin</artifactId>
10499
<configuration>
105100
<includes>
106-
<include>com/lambdatest/NativeApp.java</include>
101+
<include>com/lambdatest/android.java</include>
107102
</includes>
108103
</configuration>
109104
</plugin>

src/test/java/com/lambdatest/android.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class android {
2020
String accessKey = System.getenv("LT_ACCESS_KEY") == null ? "LT_ACCESS_KEY" //Enter the Access key here
2121
: System.getenv("LT_ACCESS_KEY");
2222
public static RemoteWebDriver driver = null;
23-
public String gridURL = "@beta-hub.lambdatest.com/wd/hub";
23+
public String gridURL = "@mobile-hub.lambdatest.com/wd/hub";
2424
public String status = "passed";
2525
@Before
2626
public void setUp() throws Exception {
@@ -32,7 +32,7 @@ public void setUp() throws Exception {
3232
capabilities.setCapability("deviceName", "Pixel 6"); //Enter the name of the device here
3333
capabilities.setCapability("isRealMobile", true);
3434
capabilities.setCapability("platformVersion","12");
35-
capabilities.setCapability("app","App_ID"); //Enter the App ID here
35+
capabilities.setCapability("app","APP_URL"); //Enter the App ID here
3636
capabilities.setCapability("deviceOrientation", "PORTRAIT");
3737
capabilities.setCapability("console",true);
3838
capabilities.setCapability("network",true);

src/test/java/com/lambdatest/ios.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class ios {
2020
String accessKey = System.getenv("LT_ACCESS_KEY") == null ? "LT_ACCESS_KEY" //Enter the Access key here
2121
: System.getenv("LT_ACCESS_KEY");
2222
public static RemoteWebDriver driver = null;
23-
public String gridURL = "@beta-hub.lambdatest.com/wd/hub";
23+
public String gridURL = "@mobile-hub.lambdatest.com/wd/hub";
2424
public String status = "passed";
2525
@Before
2626
public void setUp() throws Exception {

0 commit comments

Comments
 (0)