Testwizard for Web testobjects
Project description
Testwizard - Web
Python language support for testing websites, web-apps or webservices using testwizard
Usage
- Import the testwizard.test and the testwizard.web packages.
- Get a session 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)
from testwizard.test import TestWizard
from testwizard.test import ResultCodes
from testwizard.web import Web
with TestWizard() as TW:
session = TW.session
print(f"param1 = {session.parameters['param1']}")
print(f"param2 = {session.parameters['param2']}")
website = Web(session, "TestwizardWebsite")
print("startWebDriver")
result = website.startWebDriver()
print(result.message)
if not result.success:
session.addFail(result.message)
exit()
# 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.3.4.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for testwizard.web-3.3.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb7e9fb88056267135b95f9e9e827ed442d9fcad7581866b76716e649095147a |
|
MD5 | 3ef985ac0865ef39996bc8dd1fc99a07 |
|
BLAKE2b-256 | 824ee62484fced08caba3e9371053c26e98d075747db8ba35e9c26284d20afc5 |