Using the scripting functionallity, BiG EVAL makes you capable of modifying the out-of-the box behavior when running a testcase or a whole testsuite. This extension-point opens a wide variaty of testing possibilities.
What is the scripting good for? Examples
The following examples are just some simple ideas to show you what the scripting can do.
- Taking probes using dynamic filter-expresions
Use the testcase control-script to calculate and set parameters that can be applied to the queries used to fetch data from your datasources. You could possibly calculate yesterdays date and use that in a WHERE-clause to limit the amount of records.
- Validate a list of KPI’s
Instead of validating just one KPI by a testcase, you can use a testcase control-script to iterate through a whole list. This allows you to run the testcase for each of the KPI’s in the list.
- Validate a matrix of KPI’s
You can even extend the behavior of the previous example and iterate through a whole table and not only a list.
- Inject metadata into a testcase
Query metadata from a metadata repository or from the object-definitions of a database and iterate through objects to apply a testcase to each of them.
- Inject actual data into testcase
Query actual data like a list of sales-teritories from your datasources and let the testcase step through this list.
- Run testcases within different system environments (Dev, Test, Prod)
Use the scripting to modify your testcases including connection-settings to your datasources depending on the actual system environment.
- Run a set of testcases for every customer (or similar)
Read a list of customers (or other records) from a datasource and run a bunch of testcases for every customer. The outcome is a comprehensive set of testing-result for data connected to every customer. You can even generate a data quality audit report for every customer.
- Conditionally executing testcases
Use a control-script within a testsuite to contorl which testcases should be run when the whole suite starts. You could possibly run small testcases during weekdays and the bigger ones on the weekend.
- Run testcases in parallel
Orchestrate the testcase execution using the .NET parallels library. With this technique you can optimize the testing-duration.
Scripting is based on Microsoft .NET-Technology and the scripting-syntax is based on C# 6.0. Because of that, you can use nearly all classes and functionallity of the .NET library within your testcase or testsuite scripting.
The following link lead to the .NET reference:
Testcase scripting vs. Testsuite scripting
Basically there are two different types of control-scripts in BiG EVAL.
The testcase control script allows you to control the internal flow of a specific testcase. The testcase control script can be edited in the “Control (Advanced)” register within the testcase editor.
The testsuite control script allows you to control the execution of a bunch of testcases that are grouped within a testsuite. Each testsuite has such a control script that per default runs every active testcase after the other. You can modify this behavior by editing the control script in the testsuites “Control (Advanced)” register.
Modifying a Control Script
Each type of contorl script (testsuite or testcase control script) comes with a default script. This simple line of code runs the actual testcase or the whole testsuite, which is the default behavior. Use the default script as your baseline when starting to build your own script.
As described above you can modify the control-script in the “Control (Advanced)” registers of either the testcase editor or the testsuite itself.