SlideShare a Scribd company logo
Structured Testing Framework
Automated Long Running Tests
Author: Serjik Zargarian
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
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.
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.
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.
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.
Test script example
<root name=”Project_Name" proj_test_path=”Integrationtest" >
<testsuite name="Over Night Orders" >
<newday name="Day0" restartServers="true" skipWeekend="false" weekends="Sat|
Sun" date="2015-03-27">
‒ <jarfile name=”overnightOrders-src" dir="${HOME}/8.6.0-SNAPSHOT/lib" >
– <package name="com.example.testcases.longrunning" >
» <exec name="overnightOrders Day0-1" class="
OvernightOrdersDay0" method=”Day0_1" arg="x y z" />
– </package>
– <package name="com.example.testcases.longrunning" >
» <exec name="overnightOrders Day0-2" class="
OvernightOrdersDay0" method="Day0_2" arg="x y z" />
– </package>
‒ </jarfile>
</newday>
</testsuite >
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)
Example Ant
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:antcontrib="antlib:net.sf.antcontrib" default="${ant.target}" basedir=".">
<target name="${ant.target}" depends="setTestClasspath">
‒ <junit fork="yes" forkmode="once" haltonerror="no" haltonfailure="no"
printsummary="yes" showoutput="true" outputtoformatters="true">
– …
– <formatter type="xml" />
– <test name="${test.package}.${test.class}" methods="$
{test.method}" outfile="reports/TEST-${test.class}-$
{test.method}-${NOW}">
» <formatter type="xml"/>
– </test>
‒ </junit>
</target>
</project>
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.+

More Related Content

PPTX
{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종
PDF
Browser testing with nightwatch.js - Drupal Europe
PDF
Test Driven Development
PDF
Qtp Tutorial 4 Recording Of Tests In Qtp With Drag And Drop Web Elements
PDF
Developer Test - Things to Know
DOCX
Batch processing Demo
PDF
PDF
JavaScript Unit Testing with an Angular 5.x Use Case 101
{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종
Browser testing with nightwatch.js - Drupal Europe
Test Driven Development
Qtp Tutorial 4 Recording Of Tests In Qtp With Drag And Drop Web Elements
Developer Test - Things to Know
Batch processing Demo
JavaScript Unit Testing with an Angular 5.x Use Case 101

What's hot (19)

PPTX
Quartz connector
PPTX
PPT
PDF
Adventures In JavaScript Testing
PDF
Unit tests in node.js
PDF
Nestjs MasterClass Slides
PDF
End to end todo list app with NestJs - Angular - Redux & Redux Saga
PDF
Unit Testing - The Whys, Whens and Hows
PPTX
Stress test your backend with Gatling
PPTX
node.js errors
PPTX
Basic example using quartz component in anypoint studio
PDF
Understanding JavaScript Testing
PDF
What's New in Django 1.6
PDF
Javascript unit testing with QUnit and Sinon
PPSX
Sql triggers
PDF
Advanced Jasmine - Front-End JavaScript Unit Testing
PPTX
Why reactive:reactive programming spring 5
PDF
Lotny start z testami kontraktowymi
PPTX
Building unit tests correctly
Quartz connector
Adventures In JavaScript Testing
Unit tests in node.js
Nestjs MasterClass Slides
End to end todo list app with NestJs - Angular - Redux & Redux Saga
Unit Testing - The Whys, Whens and Hows
Stress test your backend with Gatling
node.js errors
Basic example using quartz component in anypoint studio
Understanding JavaScript Testing
What's New in Django 1.6
Javascript unit testing with QUnit and Sinon
Sql triggers
Advanced Jasmine - Front-End JavaScript Unit Testing
Why reactive:reactive programming spring 5
Lotny start z testami kontraktowymi
Building unit tests correctly
Ad

Similar to Structured Testing Framework (20)

PPT
Ant Unit Your Functional Test
PDF
Eclipse Testing Day 2010. Xored Q7
PPT
Comparative Development Methodologies
PDF
Slawomir Kluz - ScalaTest from QA perspective (Quality Questions Conference)
DOCX
Diversified AT Framework - Initial Version
PPT
XML2Selenium Technical Presentation
PDF
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
PPTX
Using Jenkins and Jmeter to build a scalable Load Testing solution
PPTX
Presentation sem 1.pptx
PPSX
PDF
junit-160729073220 eclipse software testing.pdf
PPTX
The_Little_Jenkinsfile_That_Could
PDF
Cloud-based Test Microservices JavaOne 2014
PDF
Learning on Deep Learning
PDF
DataStax | Effective Testing in DSE (Lessons Learned) (Predrag Knezevic) | Ca...
PDF
Effective Testing in DSE
PPTX
Vishal_Final_Evaluation_PPT
ODP
Beyond Unit Testing
PDF
Build Quality In: Stop the Line - Peter Antman
PPTX
Automated Integration Testing of Complex Solutions
Ant Unit Your Functional Test
Eclipse Testing Day 2010. Xored Q7
Comparative Development Methodologies
Slawomir Kluz - ScalaTest from QA perspective (Quality Questions Conference)
Diversified AT Framework - Initial Version
XML2Selenium Technical Presentation
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Using Jenkins and Jmeter to build a scalable Load Testing solution
Presentation sem 1.pptx
junit-160729073220 eclipse software testing.pdf
The_Little_Jenkinsfile_That_Could
Cloud-based Test Microservices JavaOne 2014
Learning on Deep Learning
DataStax | Effective Testing in DSE (Lessons Learned) (Predrag Knezevic) | Ca...
Effective Testing in DSE
Vishal_Final_Evaluation_PPT
Beyond Unit Testing
Build Quality In: Stop the Line - Peter Antman
Automated Integration Testing of Complex Solutions
Ad

Recently uploaded (20)

PPTX
assetexplorer- product-overview - presentation
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
System and Network Administraation Chapter 3
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
System and Network Administration Chapter 2
PDF
medical staffing services at VALiNTRY
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
top salesforce developer skills in 2025.pdf
assetexplorer- product-overview - presentation
Navsoft: AI-Powered Business Solutions & Custom Software Development
Adobe Illustrator 28.6 Crack My Vision of Vector Design
System and Network Administraation Chapter 3
PTS Company Brochure 2025 (1).pdf.......
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Designing Intelligence for the Shop Floor.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
How to Choose the Right IT Partner for Your Business in Malaysia
Odoo Companies in India – Driving Business Transformation.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Internet Downloader Manager (IDM) Crack 6.42 Build 41
CHAPTER 2 - PM Management and IT Context
Operating system designcfffgfgggggggvggggggggg
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
System and Network Administration Chapter 2
medical staffing services at VALiNTRY
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
top salesforce developer skills in 2025.pdf

Structured Testing Framework

  • 1. Structured Testing Framework Automated Long Running Tests Author: Serjik Zargarian
  • 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.
  • 7. Test script example <root name=”Project_Name" proj_test_path=”Integrationtest" > <testsuite name="Over Night Orders" > <newday name="Day0" restartServers="true" skipWeekend="false" weekends="Sat| Sun" date="2015-03-27"> ‒ <jarfile name=”overnightOrders-src" dir="${HOME}/8.6.0-SNAPSHOT/lib" > – <package name="com.example.testcases.longrunning" > » <exec name="overnightOrders Day0-1" class=" OvernightOrdersDay0" method=”Day0_1" arg="x y z" /> – </package> – <package name="com.example.testcases.longrunning" > » <exec name="overnightOrders Day0-2" class=" OvernightOrdersDay0" method="Day0_2" arg="x y z" /> – </package> ‒ </jarfile> </newday> </testsuite >
  • 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)
  • 9. Example Ant <?xml version="1.0" encoding="UTF-8"?> <project xmlns:antcontrib="antlib:net.sf.antcontrib" default="${ant.target}" basedir="."> <target name="${ant.target}" depends="setTestClasspath"> ‒ <junit fork="yes" forkmode="once" haltonerror="no" haltonfailure="no" printsummary="yes" showoutput="true" outputtoformatters="true"> – … – <formatter type="xml" /> – <test name="${test.package}.${test.class}" methods="$ {test.method}" outfile="reports/TEST-${test.class}-$ {test.method}-${NOW}"> » <formatter type="xml"/> – </test> ‒ </junit> </target> </project>
  • 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.+