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)
Release files for testOrganizer 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| testOrganizer-0.0.7.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| testOrganizer-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / testOrganizer-0.0.7.tar.gz
| Download URL | testOrganizer-0.0.7.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e40e3ff2c48f51e10d90cf43b3254365baa1bfd53b01c6fda85ada65b3f80907
|
|
BLAKE2b-256 checksum How to use checksums |
a89b6a85a553160c5391e6bb52d53ca3ff0891e3dafaccd32534f627d2bcce39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / testOrganizer-0.0.7-py3-none-any.whl
| Download URL | testOrganizer-0.0.7-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86b0d534cf495964839dda91f493907137c3b37ffd5b45b6b30e9b5de8db19aa
|
|
BLAKE2b-256 checksum How to use checksums |
5f003842b97b8ec791386d7a41a74c146119a8dee2e05d38e74fb39c9279bed7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|