Testwizard for Web testobjects
Project description
Testwizard - Web
Python language support for testing websites, web-apps or webservices using testwizard
Usage
- import the testwizard.core and the testwizard.web packages
- get a sesion and use it to create a web testobject.
- Use this object to execute commands You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.
Sample script
Python (website.js)
import sys
import time
from testwizard.core import TestWizard
from testwizard.core import ResultCodes
from testwizard.web import Web
with TestWizard() as TW:
session = TW.session
website = Web(session, "TestwizardWebsite")
print("startWebDriver")
result = website.startWebDriver()
print(result.message)
if (not result.success):
session.addFail(result.message)
# Add your commands here
print("quitDriver")
result = website.quitDriver()
print(result.message)
if (not result.success):
session.addFail(result.message)
if (not (session.hasFails() or session.hasErrors())):
session.setResult(ResultCodes.PASS, "Test was successful")
sidecar file (website.json)
{
"tester": "Some tester",
"parameters": [
{ "name": "param1", "value": "value1"},
{ "name": "param2", "value": "value2"}
],
"resources": [{ "category": "WEB", "name": "TestwizardWebsite", "id": "Testwizard web site"}
],
"outputFolder": "c:\\temp"
}
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
testwizard.web-3.1.3.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for testwizard.web-3.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a639550d993f379e40dab4ca944bcf35ce98fc5d9b6f3f6336b04429f703d00 |
|
MD5 | d810893d12c4cdb6c08a72552ce7ad99 |
|
BLAKE2b-256 | addba35ab06c3ff009b9667f6b8b8fd0daf20dc22bb66d10361df0363fe9a6c5 |