Enable LOMBOK plugin on your IDE, follow the vendor instructions for installing LOMBOK for your IDE.
Go to "Annotation Processors"
Install IDE configurations from Wikia's Java Coding Guidelines
Please remember to keep this repository up to date as the tests become worthless otherwise. A good rule of thumb is to add a new test that covers whatever bug you're fixing so we can track regressions on it. Also, make sure to code your tests in a cross-operating system compliant manner as it's valid to run them in Windows, Mac or Linux environments.
The following steps should get you set up for running Selenium tests locally on your machine:
config_default.ymlfile and name it
config.yml(this will be your local config)
config.ymlto point to
credentials.xmlfile from cloned
In selenium-tests repository run gradle wrapper:
./gradlew test -Dbrowser= -Denv= -Dgroups=It is also possible to run mobile tests on real devices (Currently only Android is supported). In case of running tests on real devices additional parameters are supported:
-Dplatform - determine if IOS or ANDROID should be used
-Dplatform-version - get device's uuid from mobile config for provided platform version
-Ddevice-id - get device with provided uuid
If both platform-version and device-id are provided device with provided uuid would be chosen.
All commands must be run from the
selenium-testsdirectory cloned during setup process above
./gradlew test -Denv=preview -Dgroups=Login
./gradlew test -Denv=prod -Dgroups=Login
./gradlew test -Dbrowser=CHROME -Denv= -Dwiki-name=muppet -Dgroups=Login
./gradlew test -Dbrowser=CHROMEMOBILEMERCURY -Denv=dev-karol -Dwiki-name=muppet -Dgroups=Login
If everything goes right it should log in as a QATestsUser.
./gradlew test -Dplatform=ANDROID -Ddevice-id=0243e69a8ec7e8de -Dgroups=MobileLogin
./gradlew test -Dplatform=ANDROID -Dplatform-version=4.4 -Dgroups=MobileLogin
The following are valid test parameters:
-Dbrowser- Which browser to use, for example "CHROME"
-Denv- The environment on which the test(s) should be run in, for example
-Dwiki-name- The wiki where the test(s) should be run on, for example "mediawiki119", "muppet"
-Dgroups- (Optional) Which test groups to run, for example "Chat". Optional. Uses all tests if omitted
-Ddisable-flash- (Optional) Disable Flash plugin, any String value = true
The following are valid for use in the
Whole group of tests can be run with
-Dgroupsparameter. Groups are declared as annotation
@group()above the tests.
Most tests write logs and take screenshots while they run which provide further information about what happened if they failed. These files reside in the
./logsdirectory and can be viewed locally in your browser by navigating to that folder.