Browse Source

TechSpec Database and UI

bernhardbuhl 4 years ago
parent
commit
d852688686
4 changed files with 56 additions and 6 deletions
  1. 0 0
      DropsTestExample.xlsx
  2. BIN
      DropsTestRunDefinition.xlsx
  3. 15 6
      README.md
  4. 41 0
      TECHSPEC_DATABASE_AND_UI.md

dropsApiTest.xlsx → DropsTestExample.xlsx


BIN
DropsTestRunDefinition.xlsx


+ 15 - 6
README.md

@@ -1,18 +1,27 @@
 # Welcome
-This is the current release of baangt - the tool for "Basic And Advanced Next Generation Testing".
+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:
-``GIT CLONE https://gogs.earthsquad.global/baangt``
+Clone the repository: ``GIT CLONE https://gogs.earthsquad.global/baangt``
 
-#Usage:
-##Run the provided Testcase
-``Python baangt.py`` will run the Testcase specified in file ``default.json``
+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.
+
+## Installation from DOCKER Hub:
+## Fire up your own Docker:
 
+#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
 

+ 41 - 0
TECHSPEC_DATABASE_AND_UI.md

@@ -0,0 +1,41 @@
+#TechSpec TestRun-Database
+The database is a an alternative to creating testrun settings for baangt in XLSX. 
+Working with the database provides - other than XLSX - also the option to reuse elements (TestCaseSequence, TestCase, TestStepSequence) inbetween testruns, while in XLSX-Format there is no referencing, only Copy+Past (and resulting maintenance issues)
+
+##Create Database and UI for Testrun Definitions
+Database and UI should be implemented using FLASK and ORM. Database SQLite is enough for now.
+###Main entities
+* Testrun
+* TestCaseSequence (n:m to TestRun)
+* DataFiles (n:m) to TestCaseSequence 
+(For now baangt.py supports only 1 dataFile. Later this will be refactored to support multiple files. Also there will be an option to connect to a database and use Query as input)
+* TestCase (n:m) to TestCaseSequence
+* TestStepSequence (n:m) to TestCase
+* TestStepExecution (1:n) to TestStepSequence
+
+###Supporting entities
+When a new database is created all entries in supporting entities shall be created (by ORM - not any db-specific command)
+* GlobalTestStepExecution (identical to TestStepExecution table but for reusable TestSteps)
+* ClassNames (Value table for Classnames in TestCaseSequence, TestCase, TestStepSequence)
+* BrowserTypes (Value table for TestCase->BrowserType).
+  * Values: FF, Chrome, IE, Safari, Edge
+* TestCaseType (Value table for Testcase->TestCaseType)
+  * Values: Browser, API-Rest, API-SOAP, API-oDataV2, API-oDataV4
+* ActivityType (Value table for TestStepExecution->Activity)
+  * Values: lots - see Note in Tab `TestStepExecution` in column `Activity`
+* LocatorType (Value table for TestStepExecution->LocatorType)
+  * Values: xpath, css, id
+
+Supporting entities shall have language/locale depending descriptions, that will be used in the UI to display tooltips and/or explanations in Dropdown-Fields.
+  
+##Create the UI
+Hierarchical display of testruns and all their subsequent entities. Most probably something like a Tree would be good with +/- Buttons to add/remove elements.
+
+###Special treatment of Global Variables
+GlobalVariables are stored in baangt.base.GlobalConstants.py - these variables shall be available at several places, additionally to manually entered values (see excel-sheet `DropsTestRunDefinition`)
+
+###Testdatafiles:
+Headers of testdatafiles must be read, so that the column names are available for selection in TestStepExecution-Steps for use in Column `Value` or `Value2` 
+
+###Execution
+There should be a "Run"-Button, which can be pressed whenever the user is inside a testrun (or any level below). When the button is clicke, all changes shall be saved to the database. `baangt.py` shall be called with the testrun-name of the currently active testrun in the UI. Further parameters need to be discussed.