Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Writing Tests

jvanderwee edited this page Jan 3, 2015 · 1 revision

Writing tests

There are a few rules to follow when you wish to write your own tests using Bootstrapium.

Class name

  • Any web tests must be within a class ending in WebTest.
  • Any mobile web tests must be within a class ending in MobiTest.
  • Any mobile app tests must be within a class ending in AppTest.

For example, the example web tests are in the class DynamicLoadingWebTest.

Extend BaseTest

Test classes must extend com.bootstrapium.tests.internal.BaseTest. This handles the setup and teardown of the WebDriver / AppiumDriver sessions.

For example:

public class DynamicLoadingWebTest extends BaseTest { ... }

Page objects

As you can see in the example tests there are no references to WebDriver or AppiumDriver thanks to Page Objects and Google Guice. This results in more readable tests which only deal with the services offered by your application and not the details and mechanics of it. For further explanation see the Page Objects page.