Getting Started With Bobcat and CrossBrowserTesting
For this document, we provide example tests located in our Bobcat Github Repository.
Bobcat is framework dedicated to automated functional testing of web applications. It wraps Selenium, so anything possible in raw Selenium can be done with Bobcat. In this guide we will use Bobcat along with the Selenium Webdriver and the Java programming language.
Setting Up Bobcat
- Ensure Java is installed on your machine. If you do not have Java installed, we recommend following the documentation: https://www.java.com/en/download/help/download_options.xml
- Download the Bobcat template.
- Create a new project using the command:
./gradlew generate -i -Ptarget=PROJECT_DIRECTORY -Ptemplate=TEMPLATE_TO_USE
target– directory where the Bobcat project will be generated (by default it will be created inside this cloned/downloaded repository – which we don’t recommend as it will be deleted each time project is generated)
template– determines which template from the ones available will be used to generate the project (the default template is
Running A Test
- Navigate to the chosen PROJECT_DIRECTORY
- Edit file ../src/main/resources/config.yaml to contain:
default: properties: webdriver.type: remote webdriver.url: http://YOUR_USERNAME:YOUR_AUTHKEY@hub.crossbrowsertesting.com:80/wd/hub webdriver.cap.platform: Windows webdriver.cap.browserName: Chrome webdriver.cap.recordVideo: true webdriver.cap.name: Bobcat Example
Be sure to enter your username, encoding the @ with %40, and authkey
- Run the default test included using the command:
./gradlew clean test
Congratulations! You have successfully configured an automated test using Bobcat. Now you are ready to see your test start to run in the Crossbrowsertesting app.
By following the steps outlined in this guide, you are now able to seamlessly integrate Bobcat and CrossBrowserTesting. If you have any questions or concerns, please feel free to reach out to our support team.