Git Product home page Git Product logo

tests's Introduction

Test for Wordpress site and "thanks" plugin

Requirements

  • python3
  • pip3
  • selenium package for python3
  • Chrome driver for selenium

Setup

Install selenium package for python3.

pip3 install selenium

Install Chrome driver for selenium. Check out page.

Usage

To run tests you need to set following environment variables:

WP_URL - URL for your local wordpress. For example export WP_URL='http://192.168.50.2' WP_PLUGIN_VERSION - version of thanks-after-post plugin. For example export WP_PLUGIN_VERSION=v0.10.0

Run command:

python3 test.py

This will open new Chrome browser window and run all the tests.

Test in non-interactive mode

First of all comment line:

    chrome_options.add_argument("--headless")

So your browser wouln't be opened. It's needed to run it in container.

Run in docker container

After you apply changes from previous paragraph you should build docker container:

docker built -t wp-testing .

Next time you need to run docker container with provided variables. For example in testing of wordpress that was setup in VM:

docker run --network=host --rm -it -e WP_URL='http://192.168.50.2' -e WP_PLUGIN_VERSION='v0.10.0' wp-testing

tests's People

Contributors

aliaksei-karneyeu 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.