https://github.com/testingbot/testng-example
Example on how to run a TestNG test with TestingBot
https://github.com/testingbot/testng-example
Last synced: 11 months ago
JSON representation
Example on how to run a TestNG test with TestingBot
- Host: GitHub
- URL: https://github.com/testingbot/testng-example
- Owner: testingbot
- License: mit
- Created: 2016-05-10T17:23:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-10T17:25:06.000Z (over 9 years ago)
- Last Synced: 2025-01-19T19:16:57.663Z (about 1 year ago)
- Language: Java
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
TestingBot TestNG Example
============
What this example contains
-------------------------
This example contains a TestNG test file with 1 test: `testSimple`.
The test will start a real browser on TestingBot.com and will instruct that browser to navigate to https://testingbot.com where it will verify if the H1 is correct.
Once the test completes, the included `TestingBotTestListener` will send the test success state and testname back to TestingBot, via the TestingBot REST API.
With this example you will be able to run a TestNG test via TestingBot and see its meta-data on TestingBot.com
Running the Test
----------------------
Before you can run the test, please adjust the `getTestingBotKey` and `getTestingBotSecret` values in the TestingBotTest example to use your own key and secret, which you can get for
free from [https://testingbot.com/](https://testingbot.com/)
Once you've added your own key and secret to authenticate to our grid, use NetBeans or Eclipse to run the TestNG test.
TestingBotTestListener
----------------------
In order for TestingBot.com to be able to show the test success state and test name, it will need to receive this data via the TestingBot REST API.
We've made a `TestingBotTestListener.java` class in this example that interacts with TestNG to send this meta-data when the tests finish running.
To include this listener with your own test classes, please use:
```java
@Listeners({TestingBotTestListener.class})
public class TestingBotTest implements TestingBotSessionIdProvider, TestingBotAuthenticationProvider {
```
More info
-----------
More information is available on our support pages:
[https://testingbot.com/support/getting-started/java.html](https://testingbot.com/support/getting-started/java.html)