Coder Social home page Coder Social logo

cadasta-test's Introduction

cadasta-test

This repository contains Selenium UI automated test scripts that can be run against a cadasta server.

To install the dependencies :

pip install -r requirements.pip

To configure geckodriver (This is required if you run the tests with firefox version > 48):

Geckodriver is the new Selenium driver shipped with Firefox 48+
But there are some test cases in cadasta-test which require the Firefox version to be lower than 48.
The reason for this is, we use Python Selenium Action classes in some test cases of cadasta-test,
but as per [1]W3C Actions API is not yet implemented in geckodriver.
[1] mozilla/geckodriver#159
[2] php-webdriver/php-webdriver#359 (comment)
So, it is recommend to run tests on Firefox version < 48 until the above[1] is supported by geckodriver.

If you are running with newer version of firefox (48+) some tests will fail since the geckodriver doesn't support[1].

Download from https://github.com/mozilla/geckodriver/releases Unzip it and add to PATH variable

To configure chromedriver (If you run the tests with chrome):

Download from https://sites.google.com/a/chromium.org/chromedriver/downloads Unzip it and add to PATH variable

To run the tests :

You can run the Selenium test by executing one of the below two commands. If you give ./runtests without giving a server url, the default url http://localhost:8000 will be considered as the server url.

./runtests

./runtests <server-url>

Cleaning the Cadasta DB in a local setup

In case if you need to run tests on a local setup with a clean DB, please follow these steps.

Log into VM using vagrant ssh. Now you are inside the VM.

Then drop the DB and recreate it using following commands.

sudo -u postgres psql

drop database cadasta;

create database cadasta with owner cadasta;

Type \q and then press ENTER to quit psql

Now run following Django management commands

./manage.py migrate

./manage.py loadstatic

cadasta-test's People

Contributors

manoramahp avatar wonderchook avatar shailysangwan avatar

Watchers

Mar Sánchez avatar James Cloos 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.