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()
Important notes:
- beforeEachTest and afterEachTest must be defined first
- at the end of file print_result() must be called so that result is printed to console
- 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.6.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for testOrganizer-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65d86afd06c6d7be9d4e1780cf1a4ddd22e50eb27a0bc74491982b7dbd263f6b |
|
MD5 | a1a6f4804e0f2b15390a300e72c64ab0 |
|
BLAKE2b-256 | 9d7271ac48941765163018e2b6ee0e48ddf9763a98dd65c9140fe190c0a04fc9 |