baangt - Basic And Advanced Next Generation Testing http://baangt.org
bernhardbuhl 6afe0a0a9c Remove CustTestRun from baangt main module | 4 years ago | |
---|---|---|
baangt | 4 years ago | |
browserDrivers | 4 years ago | |
.gitignore | 4 years ago | |
DropsTestExample.xlsx | 4 years ago | |
DropsTestRunDefinition.xlsx | 4 years ago | |
LICENSE | 4 years ago | |
MakePackage.sh | 4 years ago | |
README.md | 4 years ago | |
TECHSPEC_DATABASE_AND_UI.md | 4 years ago | |
TECHSPEC_RUNLOG.md | 4 years ago | |
baangt.py | 4 years ago | |
globals.json | 4 years ago | |
requirements.txt | 4 years ago | |
setup.py | 4 years ago |
This is the current release of baangt: "Basic And Advanced Next Generation Testing".
pip install baangt
Clone the repository: GIT CLONE https://gogs.earthsquad.global/baangt
Then fire up your favorite virtual environment, e.g.
CONDA create baangt
, activate it, e.g. CONDA activate baangt
and install the necessary requirements: pip install -r Requirements.txt
and you're good to go.
#Usage:
###Preparation:
You need a datafile (example: DropsTestExample.xlsx) and a Testrun definition as Excel-Sheet (example
DropsTestRunDefinition.xlsx). Alternatively provide the definition of the testrun as JSON.
##Run the Testcase
Python baangt.py --run="DropsTestRunDefinition.xlsx
will run the Testcase specified in file
Franzi.xlsx
`.
##Process
Depending on your TestRun or TestCaseSequence settings one or more browsers (Firefox, Chrome, Safari, Internet Explorer) will start (visible or hidden) and execute the steps defined in the definition of the testrun. An output file (XLSX) consisting of "baangt_" + Testrun-Name + Date and Time will be created.
##Create your own TestStep:
Every once in a while the TestStep-Definition via XLSX or the database will not be enough for your use-case. You can easily subclass whatever you need and still use the rest of the framework.
from baangt.TestStep import TestStepMaster
class myTestStep(TestStepMaster):
def execute():
self.driver.goToURL("http://www.google.com")
self.driver.findByAndSetText(xpath='//input[@type="text"]', value='baangt')
self.driver.findByAndClick(xpath='(//input[contains(@type,'submit')])[3]')
That's it. All the rest is taken care of by baangt. You'll also receive a nice export file showing timing information for your TestCase.
##Browser related knowledge ###Setting, which browser to start
TestCase
in the column Browser
or in JSON: "dontCloseBrowser": "True",
"TC.Browser": "CHROME"
)
globals.json
file to overwrite any settings of the testrun definition.
"dontCloseBrowser": "True",
"TC.Browser": "CHROME"
Then call baangt.py as usual:python baangt.py --run="someRunNameXLSXorJSON" --globals='mynewGlobals.json'
#Further reading: Please see latest news on http://baangt.org for community edition and http://baangt.com for corporate environments