Skip to main content

Basic And Advanced NextGeneration Testing

Project description

Welcome

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

Installation in a python virtual environment:

Depending on your virtual environment something along these lines:

conda create baangt
conda activate baangt
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

Use baangt for API, oData V2/V4, Browser (Chrome, Firefox, Safari, IE and more) Testing based on a common data layer. As complex as this sounds, as easy is it to start with, give it a try!

Preparation

You need at least a data- and a sequence definition file (example: DropsSimple.xlsx in the root folder of baangt).

Run the Testcase

Python baangt.py --run="DropsSimple.xlsx" will execute the testcases defined in the file (login to drops-app, recycle a product)

Receive the results

You'll find the output file in the folder 1testoutput as XLSX with a summary of duration, successful vs. non-successful testcases and a second tab with details for each looped testcase.

Awesome, but not enough?

You're deeply impressed by the simplicity of the solution, but want MORE? We've got you covered. The second example shows the same outcome with much greater flexibility. For the second execution you'll use DropsTestRunDefinition.xlsx-File. You can see there are more Tabs than in the first example, for instance can you specify which datafile and tabname(s) to use for execution of a testrun, which lines from the datafile to skip/run, which browser to use and much more. Calling baangt.py is still same simple: Python baangt.py --run="DropsTestRunDefinition". Again you'll find an excel sheet in the folder 1Testoutput.

Nice(r), but how about a real life example?

You're right. Nobody can test his application with 5 datafields and 1 business process.

Real life regression tests often span multiple applications (thus we use TestCaseSequence), many business processes (the testcases) and each of them in countless variations (datafile with usage of TestStepSequences). No matter, how complex the application under test is, the start is always a Testrun definition.

Btw. try python baangt.py without parameters to start the UI. It should run on Mac, Windows and all major Linux-Distributions with X11

Still want more? Create your own TestStepClass:

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.

You can subclass any other functionality, that doesn't fully fit your needs (IBAN-Generation, Browser-Handling, Timing) and also create your own Assertion-classes (for instance if you need to receive data from a Host-System or RFC/SOAP-Connection, which is not natively supported by baangt.py). Of course you'd only re-implement methods, that you need to enrich and consume everything else from the framework.

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'

Starting browser in Headless Mode:

Either in XLSX or in JSON on level TestCase set the BrowserOptions as follows:

{'HEADLESS': 'True'}

Further reading:

Please see latest news on http://baangt.org for community edition and http://baangt.com for corporate environments.

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

baangt-2020.1.1b15.tar.gz (55.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

baangt-2020.1.1b15-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

Details for the file baangt-2020.1.1b15.tar.gz.

File metadata

  • Download URL: baangt-2020.1.1b15.tar.gz
  • Upload date:
  • Size: 55.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for baangt-2020.1.1b15.tar.gz
Algorithm Hash digest
SHA256 397a20fe939b99254cd3de96d185c38408d52196c4a9b989b90aea2f02b1f3d2
MD5 0c16d085f2415155f1a2c1e96fd0174b
BLAKE2b-256 eee525904b4e714be754175b90895b3b0cf83f5f2743433e99f168d1fb73e8ac

See more details on using hashes here.

File details

Details for the file baangt-2020.1.1b15-py3-none-any.whl.

File metadata

  • Download URL: baangt-2020.1.1b15-py3-none-any.whl
  • Upload date:
  • Size: 75.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for baangt-2020.1.1b15-py3-none-any.whl
Algorithm Hash digest
SHA256 606baffb751298c4e29b2accc55913f8cfce77d84af556504428a63197c2e9dc
MD5 5d2aa5c86b1bf80e6d1cdd30f9b74f37
BLAKE2b-256 1f454c2da510bd220cf6f394eb5aab599ed81902c44802d319ec4f1e82689e9d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page