Skip to main content

simulated & automated end-to-end website testing software

Project description

anna

End-to-end website testing software using selenium

Usage

I've made docker containers for firefox & chrome, as well as a RESTful API.

Run anna

arg description required
-d specify the driver yes
-s specify the site yes
-h display help no
-v verbose mode no
-H run in headless mode no
-r specify the resolution of the drivers (defaults to 1920x1080) no
-i set the id (used by anna-api) no

Test definitions

Test cases are defined in the tests/anna/ directory. Each website should have a json file as well as a subdirectory under tests/anna/ containing test definitions. If a test is referenced, but not defined for a particular website, anna will use the base directory as a fallback. Consider the following file structure:

anna/
    tasks/
    	anna/
		example.json
		base/
			do_thing.json
		example/
			go_to_page.json

Example website configuration (tests/anna/example.json):

{
  "url": "https://example.com",
  "sequence": {
    "0": "do_thing",
    "1": "go_to_page"
  }
}

Example test definition (tests/anna/example/go_to_page.json):

{
  "events": [
    {
      "type": "click",
      "target": ".target-class"
    },
    ...
  ],
  "assertions": [
    {
      "type": "current_url",
      "is": "https://example.com/page/"
    },
    ...
  ]
}

Currently implemented event types

  • click {"type": "click", "target": "#unique_element}
  • sendkeys {"type": "sendkeys", "target": "#unique_element}
  • submit {"type": "submit", "target": "#unique_element}
  • hover {"type": "hover", "target": "#unique_element}
  • wait {"type": "wait", "target": "#unique_element} Waits for a target element to become visible
  • switch_to {"type": "switch_to", "target": "#unique_element} Changes the focus to an iframe

Currently implemented assertion types

  • current_url {"in": "somepage"} or {"is": "https://example.com/somepage"}
  • element_exists {"target": ".some-class"}

TODO

  • credentials-pool using -i from anna-api
  • database assertions
  • subroutine processing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anna_node-1.1.6.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anna_node-1.1.6-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file anna_node-1.1.6.tar.gz.

File metadata

  • Download URL: anna_node-1.1.6.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for anna_node-1.1.6.tar.gz
Algorithm Hash digest
SHA256 a7c28915191ee88f05c36d60f058b2508abf711a1d64e2f625c84a3bf3decbb2
MD5 d7e1aec6f96b3cb12ddf1e7af5fc5e07
BLAKE2b-256 29e5476ff39d086f823e2828f90109f3d08ab63a126ce99c8dc9cf151f665070

See more details on using hashes here.

File details

Details for the file anna_node-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: anna_node-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for anna_node-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5188357911e917a09b8803f66ada334ab9f75871a5dd575077f4349346e0c334
MD5 64da7d5f49096d5f964c96e9cd57e8aa
BLAKE2b-256 aa8eb32d986fc473d4a6b897d6a939a5bf5e6cfa345cb845b121a7f2be16b8fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page