baangt - Basic And Advanced Next Generation Testing http://baangt.org

bernhardbuhl 6afe0a0a9c Remove CustTestRun from baangt main module 4 years ago
baangt 90c6b765d8 Wait for Element now also with ID 4 years ago
browserDrivers 912c9ea72e Windows-Port Paths 4 years ago
.gitignore a5cccfb0e5 without baangt.ini 4 years ago
DropsTestExample.xlsx d852688686 TechSpec Database and UI 4 years ago
DropsTestRunDefinition.xlsx d852688686 TechSpec Database and UI 4 years ago
LICENSE 245ac528a5 Package for PyPi, Split between VIG and Standard-Package 4 years ago
MakePackage.sh 27175b4db7 Lots of Package-Imports corrected 4 years ago
README.md 703bd41900 Overwrite Browser from default.json. 4 years ago
TECHSPEC_DATABASE_AND_UI.md d852688686 TechSpec Database and UI 4 years ago
TECHSPEC_RUNLOG.md f6449abe2a TechSpec RunLog 4 years ago
baangt.py 6afe0a0a9c Remove CustTestRun from baangt main module 4 years ago
globals.json 912c9ea72e Windows-Port Paths 4 years ago
requirements.txt 6afe0a0a9c Remove CustTestRun from baangt main module 4 years ago
setup.py 0972b51a84 baangt.py as Main program, removed TestRunFromExcel.py and replaced by simpler TestRunExcelImporter.py. Moved all memory to TestRunUtils.py 4 years ago

README.md

Welcome

This is the current release of baangt: "Basic And Advanced Next Generation Testing".

Installation in a virtual environment:

pip install baangt

Installation from GIT-Repository:

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 (exampleDropsTestRunDefinition.xlsx). Alternatively provide the definition of the testrun as JSON. ##Run the Testcase Python baangt.py --run="DropsTestRunDefinition.xlsxwill run the Testcase specified in fileFranzi.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

  • Method 1: Set the browser in the Testrun Definition (either in XLSX in Tab TestCase in the column Browser or in JSON:
  "dontCloseBrowser": "True",
  "TC.Browser": "CHROME"

)

  • Method 2: Set the browser in the 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