Giter Site home page Giter Site logo

automated-tests's Introduction

Selenium Tests

This repository contains Selenium tests for the Wikia App.

Dependencies

  1. Make sure you have Java and Maven installed on your system, if not follow the vendor instructions for installing them on your operating system.
  2. In order to run tests in CHROME browser make sure you have chromedriver and it is accessibile
    • in Linux OS family it would be in /usr/bin/ for example
    • in Windows OS family you should export your chromedriver localization to system path

Adding Tests

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 manor as it's valid to run them in Windows, Mac or Linux environments.

Running Tests

The following steps should get you set up for running Selenium tests locally on your machine:

  1. Clone this repository to your local machine (not your devbox).
  2. Clone selenium-config repository to the same folder (eg. myfolder/selenium-tests and myfolder/selenium-config)
  3. Create symlinks for /selenium-config/config.xml and /selenium-config/captcha.txt (note the leading slash) that point to these files in your selenium-config repository.
  4. Open up a terminal and navigate to the root directory of the repository.

Using Maven, you may now run any tests you want on whatever database and domain you want:

mvn clean test -Dbrowser=FF -Dbase-address=<address> -Dgroups=<group> -Dlive-domain=<address>

Example command:

mvn clean test -Dbrowser=FF -Dbase-address=http://mediawiki119.wikia.com/ -Dgroups=Login

If everything goes right it should log in as a QATestsUser.

Parameters

The following are valid test parameters:

  • -Dbrowser - Which browser to use, for example "CHROME"
  • -Dbase-address - The base URL to run in the browser, for example "http://yourname.wikia-dev.com/"
  • -Dgroups - (Optional) Which test groups to run, for example "Chat". Optional. Uses all tests if omitted
  • -Dlive-domain - (Optional) The base URL to run in the browser, for example "http://www.wikia.com/". Only required for Hubs tests

Browsers

The following are valid for use in the -Dbrowser parameter:

  • FF
  • CHROME
  • IE
  • GHOST (phantomjs)

Groups

The following are valid for use in the -Dgroups parameter:

  • ArticleCRUDAdmin
  • ArticleCRUDAnonymous
  • ArticleFeaturesCRUDAdmin
  • CategoriesTestsAnonymous
  • Chat
  • CNW_lang
  • CNW
  • Hubs
  • ImageServing
  • Login
  • MessageWall
  • RTE
  • Search
  • Toolbar

Reading Logs

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 ./logs directory and can be viewed locally in your browser by navigating to that folder.

automated-tests's People

Contributors

arturd avatar jnrbsn avatar kflorence avatar lizlux avatar lukaszkonieczny avatar piotrgackowski avatar rodrigomolinerogomez avatar themech avatar wyvek avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.