Organize tests and show results
Project description
How to use it:
from testOrganizer.TestDecorator import test, beforeEachTest, afterEachTest, print_result
@beforeEachTest()
def be():
print("before each test")
@afterEachTest()
def ae():
print("after each test")
@test("First test", should_execute=False, info="Bug found")
def test1():
print("test")
@test("Second test")
def test2():
print("test")
print_result()
print_html("LoginFeature", r"C:\Users\us\Desktop\htmlLogs\testOrganizer.html")
Important notes:
- beforeEachTest and afterEachTest must be defined first
- print_result() should be called so that result is printed to console (at the end of file)
- print_html() should be called to print result to html (at the end of file)
- for sharing variables over functions, python rules are applied
- code outside of given functions will also be executed as in standard python script
For sharing variables over functions example:
browser = webdriver.Chrome()
@test("First test")
def test1():
global browser
browser.get(url)
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
testOrganizer-0.0.7.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for testOrganizer-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86b0d534cf495964839dda91f493907137c3b37ffd5b45b6b30e9b5de8db19aa |
|
MD5 | f60f0255bd6e9976184558512f1d5e30 |
|
BLAKE2b-256 | 5f003842b97b8ec791386d7a41a74c146119a8dee2e05d38e74fb39c9279bed7 |