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 details)
Built Distribution
File details
Details for the file testOrganizer-0.0.7.tar.gz
.
File metadata
- Download URL: testOrganizer-0.0.7.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e40e3ff2c48f51e10d90cf43b3254365baa1bfd53b01c6fda85ada65b3f80907
|
|
MD5 |
18cc3ca3fc9dede948757e3fa5d0aabe
|
|
BLAKE2b-256 |
a89b6a85a553160c5391e6bb52d53ca3ff0891e3dafaccd32534f627d2bcce39
|
File details
Details for the file testOrganizer-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: testOrganizer-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
86b0d534cf495964839dda91f493907137c3b37ffd5b45b6b30e9b5de8db19aa
|
|
MD5 |
f60f0255bd6e9976184558512f1d5e30
|
|
BLAKE2b-256 |
5f003842b97b8ec791386d7a41a74c146119a8dee2e05d38e74fb39c9279bed7
|