Skip to content

Added Gradle config support for JUnit 4 & 5 #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

rhisav-25
Copy link
Contributor

@rhisav-25 rhisav-25 commented Mar 26, 2025

JIRA :- https://browserstack.atlassian.net/browse/AAP-15642
Added build.gradle and settings.gradle for gradle config
Updated Readme and workflow for steps to run tests using gradle.

@rhisav-25 rhisav-25 requested a review from a team as a code owner March 26, 2025 15:04
run: |
cd junit-5/ios
gradle clean sampleTest
- name: Run gradle sample-local-test for junit4 ios
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Run gradle sample-local-test for junit4 ios
- name: Run gradle sample-local-test for junit5 ios

README.md Outdated
@@ -25,6 +25,10 @@ These code samples are currently based on:
- If Maven is not downloaded, download it from [here](https://maven.apache.org/download.cgi)
- For installation, follow the instructions [here](https://maven.apache.org/install.html)

3. Gradle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maven and gradle should be downloaded alternatively right and presence of both is not required. Can we update th readme accordingly.

README.md Outdated
@@ -69,11 +73,13 @@ Getting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't

- Junit4
- Update `browserstack.yml` file at root level of [Android Junit4 examples](junit-4/android) or [iOS Junit4 examples](junit-4/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings)
- Run `mvn test -P sample-test`
- Run `mvn test -P sample-test` to run in maven enviroment.
- Run `gradle clean sampleTest` to run in gradle enviroment.

- Junit5
- Update `browserstack.yml` file at root level of [Android Junit5 examples](junit-5/android) or [iOS Junit5 examples](junit-5/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings)
- Run `mvn test -P sample-test`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inconsistency in instruction here

include 'com/browserstack/LocalTest*'

jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need empty line here

}
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line

include 'com/browserstack/LocalTest*'

jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

}
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

@rajpatta rajpatta merged commit bd9ea11 into browserstack:master Apr 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants