Bobcat

Applies to CrossBrowserTesting SaaS, last modified on January 10, 2023

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.

Set up Bobcat

  1. 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.

  2. Download the Bobcat template.

  3. 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 do not 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 bobcat-junit).

Run a test

Note: You will need to use your Username and Authkey to run your tests on CrossBrowserTesting To get yours, sign up for a free trial or purchase a plan.
  1. Navigate to the chosen PROJECT_DIRECTORY

  2. Edit file ../src/main/resources/config.yaml to contain:

    YAML

    default:
      properties:
        webdriver.type: remote
        webdriver.url: http://YOUR_USERNAME:[email protected]: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.

  3. 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.

Conclusions

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.

See Also

JUnit
Cucumber Java

Highlight search results