Skip to content

Commit d151ad7

Browse files
authored
Merge pull request #4 from Saurabh-LT/main
Added CI for java SDK wrapper
2 parents baf643f + d7ff30c commit d151ad7

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Java test-NG Wrapper CI
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
env:
9+
LT_USERNAME: ${{ secrets.LT_USERNAME }}
10+
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
11+
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
12+
LT_SDK_DEBUG: true
13+
SMARTUI_DEBUG: true
14+
15+
jobs:
16+
smartui-java-sdk:
17+
name: Execute java sdk build
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v2
22+
23+
- name: Install Dependencies and clean directory
24+
run: |
25+
npm i @lambdatest/smartui-cli
26+
27+
28+
- name: Execute java wrapper
29+
run: |
30+
npx smartui --version
31+
npx smartui config:create smartui-web.json
32+
npx smartui --config smartui-web.json exec -- mvn --quiet test -D suite=sdk-cloud.xml

src/test/java/com/lambdatest/sdk/SmartUISDKCloud.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public void setup(Method m, ITestContext ctx) throws MalformedURLException {
4747
@Test
4848
public void basicTest() throws Exception {
4949
System.out.println("Loading Url");
50-
driver.get("https://www.lambdatest.com/support/docs/");
50+
driver.get("https://www.lambdatest.com/visual-regression-testing");
5151
Thread.sleep(1000);
52-
SmartUISnapshot.smartuiSnapshot(driver, "docs");
52+
SmartUISnapshot.smartuiSnapshot(driver, "visual-regression-testing");
5353
Thread.sleep(5000);
5454
driver.get("https://www.lambdatest.com");
5555
Thread.sleep(1000);

0 commit comments

Comments
 (0)