2. Background
Test cases spanning over several days are intrinsically difficult to
perform manually. Things like,
Over night orders
Option expiration
Settlement etc.
Basically, verifying events occurring during T+0…T+n…T+x.
T+0
Input Output
T+xT+n
Output
Event EventEvent
3. Background
There are several challenging tasks involved on each step.
System configuration and database setup.
System start on specific business date (T+n).
Initiating system load.
Executing tests and verification.
Persisting test data
Preparing for system shut down.
Moving to a new business day and starting all over again!
Failing on any of these steps often result in repeating all the
scenarios from the start.
4. Mission
To create a generic framework which will automate the involved
procedures and minimize the amount of manual interference.
The framework should utilize available resources and minimize
the over head in terms of code mass by facilitating some basic
functionalities.
5. Framework
Protocol: An xml-based Protocol in which the test cycle is
described. e.g;
Start/stop server
Add some load
Run a jUnit test
Parser: Interprets and executes the test script using ANT.
It also offers some basic functionalities, e.g;
‒ Define a new business date (fixed- or floating).
‒ Back up/load DB.
‒ Stop/Start servers.
‒ Restre the system.
‒ or, tweak it to your needs.
6. Example
Run a jUnit
Run a set of junit tests on specific days. Let ANT execute
the tasks and store the results in an xml- or other
format. You could also let Jenkins run and display the
results of the executions.
8. XML tags
Built-in tags
<root>
<server>
<cmd>: Bash command invocation.
<invoke>: Built-in function invocation.
<testsuite>
<newday>
‒ restartServers: true/false
‒ skipWeekend:true/false
‒ Weekends: ”Sat|Sun” or ”Fri”
‒ date: Fixed date:” 2015-03-27” or incremental ”1” (”0” being
the current date). If a fixed date is defined then it will act as
a reference date for next coming incremental dates.
– Currently max 5 days is allowed when using incremental date!
<jarfile>
<package>
<exec>: Test to execute (currently jUnit)
10. Parser
To run execute cmd:$./parser.sh –tc test.xml
For help: $./parser --help
Handles most common xml syntax
Parsing based on Node-Tag-Value syntax.
<node tag1=”value1”…tag2=”value2” />
Uses ANT to execute jUnit.
Compatible with jUnit 4.+
Ant 1.8+
Bash 4.+