conduct BDD by excel feature files
Project description
Use Excel file as BDD feature file, get example data from excel files, support automation tests
#pip install excelbdd
import pytest
from excelbdd.behavior import get_example_list
import FizzBuzz
excelBDDFile = "path of excel file"
@pytest.mark.parametrize("HeaderName, Number1, Output1, Number2, Output2, Number3, Output3, Number4, Output4",
get_example_list(excelBDDFile,"FizzBuzz"))
def test_FizzBuzz(HeaderName, Number1, Output1, Number2, Output2, Number3, Output3, Number4, Output4):
assert FizzBuzz.handle(Number1) == Output1
assert FizzBuzz.handle(Number2) == Output2
assert FizzBuzz.handle(Number3) == Output3
assert FizzBuzz.handle(Number4) == Output4
Get data from table in Excel, similar to get from csv file
from excelbdd.behavior import get_example_table
@pytest.mark.parametrize("Header01, Header02, Header03, Header04, Header05, Header06, Header07, Header08",
get_example_table(excelBDDFile, "DataTable4"))
def test_get_example_tableB(Header01, Header02, Header03, Header04, Header05, Header06, Header07, Header08):
print(Header01, Header02, Header03, Header04, Header05, Header06, Header07, Header08)
"Specification by testcase" is supported. the bdd excel files can be regarded as the test reports. The test format in excel is detected automatically, only extra parameters(expected, test result) are needed to take into test method.
more information at ExcelBDD Guideline by Python
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
excelbdd-1.4.0.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file excelbdd-1.4.0.tar.gz
.
File metadata
- Download URL: excelbdd-1.4.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a86ba75bec7f25a0622dc0e6dceed9d7bab2b5a73b3647e1e790419c33ae7b63 |
|
MD5 | 62990bcfebb5ada4d5de9446ff1f61cf |
|
BLAKE2b-256 | 8007a5726f00062e0854238ff948ee5f35465ea319ae62ff8dcab75db54cafbd |
File details
Details for the file excelbdd-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: excelbdd-1.4.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4832caf7b4cf7bee375f0ea9d197f991ea69d646d0b4ebe9de51afeb08b3d50 |
|
MD5 | 448bdfb2ea56dc85d2b14194de1d9f7d |
|
BLAKE2b-256 | 7400ab116e28328bdbacc7574897ae65eb61bd647a212ae6c90b634f1ff70f90 |