SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Introduction To Clarity
What is Clarity?

Clarity is a Test Automation Framework to
make automation
● Eazy
● Organized
● Relevant
● Optimized
Why Clarity?

● To automate platform-wide scenarios.
● To execute tests against stratos and private clouds.
● To adopt tooling support to automation
   ○ Selenium
   ○ SoapUI
   ○ Jmeter
   ○ Ravana
● Reporting and keeping historical records.
● Coverage.
WSO2 Platform Scenario
More On Clarity?
Automate scenarios with multiple products with multiple
users/ tenants.
● Execute tests using different DBs, OS, browsers and
   app servers.
● Support for webcontext root, different port changes,
   host name bindings.
● Testing Clustered environments.
● Run tests against up and running server.
Unit Vs Integration Tests
Unit Tests:
 ● Focused on defining (not testing) the behavior of a particular class,
    and that class only.
 ● Fast (less than 0.1 second per test)
 ● No external implementation dependencies (filesystem, database, web
    services, etc.). All dependencies are faked for the test context.
 ● Can easily be parallelized, since each test is atomic


Integration Tests:
 ● Focused on verifying the integration of one or more components
    together.
 ● May have external dependencies. (in fact, it is likely testing the
    integration with this dependency)
 ● A test that takes longer than a unit Test should (longer than 0.1
    seconds per test)
Integration Tests Vs Platform Tests
Integration Tests - with in wso2 product
 ● Executes on product pack created by build.
 ● Not depending on other product environments.
 ● Independent.
 ● Lightweight.
 ● Covers only scenarios related to features on individual product.


Platform Tests:
 ● Can run on a configured ( With mounts , Clusters ...) product packs
    and already up and running server.
 ● Can generate scenarios based on multiple product environments.
 ● Can execute load and UI tests
Architecture Overview
● Follows TestNG Annotations bases
   Execution Structure.
● Operations based on TestNG Listeners.
   ○   Server startup/Shutdown.
   ○   Emma instrumentation, Report Generation And
       Cleaning.
   ○   Artifact Deployment /Artifact cleaning.
   ○   Tennent Creation and Registering.
   ○   Report Generation.

● Test Optimized API.
                                                     Reference:- http://www.ibm.
● Utility Classes to Support test cases.             com/developerworks/java/library/j-testng/
Execution Template for Clarity
  Execution Started
        @BeforeSuite
               @BeforeTest
                       @BeforeClass
                            @BeforeGroups
                                 @BeforeMethod
                                 @AfterMethod
                            @AfterGroups
                       @AfterClass

               @AfterTest
        @AfterSuite
  Execution Closed
TestNg Listeners
● Listeners are interfaces allows to modify TestNG's
    behavior.
● Listeners are binned to a testNg execution.
●   Listeners implement the interface org.testng.ITestListener
    ○   IExecutionListener
         ■ Triggers at start and end of any execution.
         ■ ISuiteListener.
    ○
        ■   Triggers at suite start and end.ITestListener
        ■   Triggers at Test start, Finish, Failure, Skip and partial failure.
●   Reporters implement the interface org.testng.IReporter
    ○   Notified when all the suites have been run by TestNG.
    ○   The IReporter instance receives a summary of entire test run
Usage of Listeners in Clarity
●   PlatformExecutionManager (IExecutionListener)
     ○   onExecutionStart()
          ■   Emma instrumentations
          ■   Server start
     ○   onExecutionFinish()
          ■   Server Sutdown
          ■   Emma report generation


●   PlatformSuiteManager (ISuiteListener)
     ○   Set environment properties ex- Key Store Paths
     ○   Populate Users.
Usage of Listeners in Clarity cont.d
●   PlatformTestManager (ITestListener)
     ○   On Start
          ■   Artifact Deployment
     ○   On Finish
          ■   Artifact Clean up
●   PlatformReportManager (IReporter)
     ○   Generate TestNg Report
     ○   Generate sure-fire report
     ○   Export data for Dashboard
Clarity Architecture
Artifact Repository     |-- AS
                                       | |-- aar
● Location for keeping all artifacts   | | |-- Axis2 Service.aar
                                       | |-- car
                                       | | `-- AxisCApp-1.0.0.car
   needs for your Test                 |-- BPS
                                       | `-- bpel
                                       |      |-- CleanUpTest1.zip|
● Refers by automated Artifact         |-- BRS
                                       | |-- aar
                                       | |-- rsl
   deployment process                  | `-- ruleservice
                                       |      `-- GreetingService.aar
                                       |-- DSS
● Manages my file structure            | |-- dbs
                                       | | |-- csv
                                       |-- ESB
   depending on product and artifact   | |-- car
                                       | | |-- DemoProxy-1.0.0.car
                                       | |-- endpointlookup.xml
   type.                               |-- GREG
                                       | |-- artistRegistry.gar
                                       |-- GS
                                       | `-- gadget
                                       |      `-- HelloWorldGadget.xml
                                       |-- IS
                                       | |-- IIA001Policy.xml
                                       `-- MS
                                           `-- jszip
                                              `-- schemaTest1.zip
Clarity Properties
●   File Location <FRAMEWORK_HOME>/core/org.wso2.automation.platform.
    core/src/main/resources/framework.properties


                                # Testing server details
●   Contains all information    #-------------------------------------------------------------------------------------
                                --------------
                                stratos.test=false
    about your environment.     port.enable=true
                                carbon.web.context.enable=false
                                service.deployment.delay=30000
                                cluster.enable=false
●   To configure WSO2 clarity   product.list=GREG
                                deployment.framework.enable=false
    for your environment and    deployment.framework.
                                home=/home/krishantha/automation/deployment-framework
    configure package details   coverage.enable=false
                                greg.carbon.
                                home=/home/dharshana/latestPack/gregPack2/wso2greg-4.0.0-
                                SNAPSHOT

                                as.host.name=localhost
                                as.http.port=9764
                                as.https.port=9444
                                #as.webContext.root
Manage Tenants
●   File Location
●   <FRAMEWORK_HOME>/core/org.wso2.automation.platform.
    core/src/main/resources/tenantList.csv
●   <FRAMEWORK_HOME>/core/org.wso2.automation.platform.
    core/src/main/resources/usertList.csv

        "0","admin","admin123"
        "1","admin123@wso2manualQA0002.org","admin123"
        "2","admin123@wso2manualQA0004.org","admin123"
        "3","admin123@wso2manualQA0006.org","admin123"
        "4","admin123@manualQA0001.org","admin123"
        "5","admin123@krishantha.hhh","admin123"
        "6","admin123@wso2autoQA0008.org","admin123"
        "7","admin123@wso2autoQA0009.org","admin123"
        "8","admin123@wso2autoQA0010.org","admin123"
        "9","admin123@wso2autoQA0011.org","admin123"
        "10","admin123@wso2autoQA0012.org","admin123"
        "11","admin123@wso2autoQA0013.org","admin123"
        "12","admin123@wso2autoQA0014.org","admin123"
Automated Artifact Deployment

<?xml version="1.0"?>
<scenarios>
  <scenario testName="org.wso2.automation.common.test.as.
service.AARServiceSpaceInFileNameTest">
     <products>
        <product name="AS">
          <artifacts userId="1">
             <artifact name="Axis2 Service.aar" type="aar"/>
          </artifacts>
        </product>
     </products>
  </scenario>
Write First Clarity Test - Demo
Reporting
●   Includes TestNg reports ,Junit        |-- reports
                                           | |-- BPSStructuredSuite
    Reports ( Sure Fire report), And       | | |-- classes.html
                                           | | |-- FlowClient.html
    Emma Coverage report                   | | |-- FlowClient.properties
●   Directories containing separate        | | |-- FlowClient.xml
                                           | | |-- ForEachClient.html
    results for each suite ( Directory     | | |-- ForEachClient.properties
                                           | | |-- ForEachClient.xml
    name is as same as the suite name).    | |-- index.html
●   Junit Reports ( Surefire reports).     | |-- junitreports
                                           | | |-- TEST-org.wso2.automation.
●   index.html (Dashboard for executed common.test.bps.mgts.
                                        BpelStructAct_FlowClient.xml
    test).                                 | | |-- TEST-org.wso2.automation.
                                        common.test.bps.mgtst.
                                        BpelStructAct_forEachClient.xml
Reference

OT article

http://wso2.org/library/knowledge-base/2012/06/configure-execute-tests-
clarity

TestNg documenation
http://testng.org/doc/documentation-main.html

SVN Location
 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/platform-
integration/system-test-framework
Questions?

Mais conteúdo relacionado

Mais procurados

In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleSkills Matter
 
What's new in MySQL 5.6
What's new in MySQL 5.6What's new in MySQL 5.6
What's new in MySQL 5.6Shlomi Noach
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialJean-François Gagné
 
MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...
MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...
MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...Boško Devetak
 
Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's NewNicola Pedot
 
FOSDEM 2012: MySQL synchronous replication in practice with Galera
FOSDEM 2012: MySQL synchronous replication in practice with GaleraFOSDEM 2012: MySQL synchronous replication in practice with Galera
FOSDEM 2012: MySQL synchronous replication in practice with GaleraFromDual GmbH
 
Managing and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with OrchestratorManaging and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with OrchestratorShlomi Noach
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyAlexander Kukushkin
 
Socal piggies-app-deploy
Socal piggies-app-deploySocal piggies-app-deploy
Socal piggies-app-deployjtimberman
 
Scheduling tasks the human way - Brad Wood - ITB2021
Scheduling tasks the human way -  Brad Wood - ITB2021Scheduling tasks the human way -  Brad Wood - ITB2021
Scheduling tasks the human way - Brad Wood - ITB2021Ortus Solutions, Corp
 
July 2012 HUG: Overview of Oozie Qualification Process
July 2012 HUG: Overview of Oozie Qualification ProcessJuly 2012 HUG: Overview of Oozie Qualification Process
July 2012 HUG: Overview of Oozie Qualification ProcessYahoo Developer Network
 

Mais procurados (14)

In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
What's new in MySQL 5.6
What's new in MySQL 5.6What's new in MySQL 5.6
What's new in MySQL 5.6
 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
 
MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...
MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...
MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...
 
Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's New
 
Git in action
Git in actionGit in action
Git in action
 
FOSDEM 2012: MySQL synchronous replication in practice with Galera
FOSDEM 2012: MySQL synchronous replication in practice with GaleraFOSDEM 2012: MySQL synchronous replication in practice with Galera
FOSDEM 2012: MySQL synchronous replication in practice with Galera
 
Managing and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with OrchestratorManaging and Visualizing your Replication Topologies with Orchestrator
Managing and Visualizing your Replication Topologies with Orchestrator
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
Socal piggies-app-deploy
Socal piggies-app-deploySocal piggies-app-deploy
Socal piggies-app-deploy
 
L09 Process Design
L09 Process DesignL09 Process Design
L09 Process Design
 
Scheduling tasks the human way - Brad Wood - ITB2021
Scheduling tasks the human way -  Brad Wood - ITB2021Scheduling tasks the human way -  Brad Wood - ITB2021
Scheduling tasks the human way - Brad Wood - ITB2021
 
July 2012 HUG: Overview of Oozie Qualification Process
July 2012 HUG: Overview of Oozie Qualification ProcessJuly 2012 HUG: Overview of Oozie Qualification Process
July 2012 HUG: Overview of Oozie Qualification Process
 

Semelhante a Introduction to clarity

WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Matt Fuller
 
Bgoug 2019.11 test your pl sql - not your patience
Bgoug 2019.11   test your pl sql - not your patienceBgoug 2019.11   test your pl sql - not your patience
Bgoug 2019.11 test your pl sql - not your patienceJacek Gebal
 
PaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at YelpPaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at YelpNathan Handler
 
POUG2019 - Test your PL/SQL - your database will love you
POUG2019 - Test your PL/SQL - your database will love youPOUG2019 - Test your PL/SQL - your database will love you
POUG2019 - Test your PL/SQL - your database will love youJacek Gebal
 
Load testing in Zonky with Gatling
Load testing in Zonky with GatlingLoad testing in Zonky with Gatling
Load testing in Zonky with GatlingPetr Vlček
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django ApplicationsGareth Rushgrove
 
A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment Systema3sec
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with DjangoRoger Barnes
 
Netflix Keystone Pipeline at Samza Meetup 10-13-2015
Netflix Keystone Pipeline at Samza Meetup 10-13-2015Netflix Keystone Pipeline at Samza Meetup 10-13-2015
Netflix Keystone Pipeline at Samza Meetup 10-13-2015Monal Daxini
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Opersys inc.
 
Introduction of unit test on android kernel
Introduction of unit test on android kernelIntroduction of unit test on android kernel
Introduction of unit test on android kernelJohnson Chou
 
Filesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveFilesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveMark Wong
 
Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209mffiedler
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Martin Spier
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersnuppla
 

Semelhante a Introduction to clarity (20)

Wso2 test automation framework internal training
Wso2 test automation framework internal trainingWso2 test automation framework internal training
Wso2 test automation framework internal training
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
 
Automation for developers
Automation for developersAutomation for developers
Automation for developers
 
Bgoug 2019.11 test your pl sql - not your patience
Bgoug 2019.11   test your pl sql - not your patienceBgoug 2019.11   test your pl sql - not your patience
Bgoug 2019.11 test your pl sql - not your patience
 
PaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at YelpPaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at Yelp
 
POUG2019 - Test your PL/SQL - your database will love you
POUG2019 - Test your PL/SQL - your database will love youPOUG2019 - Test your PL/SQL - your database will love you
POUG2019 - Test your PL/SQL - your database will love you
 
Load testing in Zonky with Gatling
Load testing in Zonky with GatlingLoad testing in Zonky with Gatling
Load testing in Zonky with Gatling
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django Applications
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment System
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Netflix Keystone Pipeline at Samza Meetup 10-13-2015
Netflix Keystone Pipeline at Samza Meetup 10-13-2015Netflix Keystone Pipeline at Samza Meetup 10-13-2015
Netflix Keystone Pipeline at Samza Meetup 10-13-2015
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
Introduction of unit test on android kernel
Introduction of unit test on android kernelIntroduction of unit test on android kernel
Introduction of unit test on android kernel
 
Filesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveFilesystem Performance from a Database Perspective
Filesystem Performance from a Database Perspective
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 
Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209Testing kubernetes and_open_shift_at_scale_20170209
Testing kubernetes and_open_shift_at_scale_20170209
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developers
 

Mais de Dharshana Kasun Warusavitharana (6)

Door to perfomance testing
Door to perfomance testingDoor to perfomance testing
Door to perfomance testing
 
Follow your dreams
Follow your dreams Follow your dreams
Follow your dreams
 
Quality for developers
Quality for developersQuality for developers
Quality for developers
 
Implementing Dynamic Process Migration mechanism for WSO2 Stratos
Implementing Dynamic Process Migration mechanism for WSO2 StratosImplementing Dynamic Process Migration mechanism for WSO2 Stratos
Implementing Dynamic Process Migration mechanism for WSO2 Stratos
 
Walking around linux kernel
Walking around linux kernelWalking around linux kernel
Walking around linux kernel
 
Ariane-5 shuttle Case study fault tollerance
Ariane-5 shuttle Case study fault tolleranceAriane-5 shuttle Case study fault tollerance
Ariane-5 shuttle Case study fault tollerance
 

Introduction to clarity

  • 2. What is Clarity? Clarity is a Test Automation Framework to make automation ● Eazy ● Organized ● Relevant ● Optimized
  • 3. Why Clarity? ● To automate platform-wide scenarios. ● To execute tests against stratos and private clouds. ● To adopt tooling support to automation ○ Selenium ○ SoapUI ○ Jmeter ○ Ravana ● Reporting and keeping historical records. ● Coverage.
  • 5. More On Clarity? Automate scenarios with multiple products with multiple users/ tenants. ● Execute tests using different DBs, OS, browsers and app servers. ● Support for webcontext root, different port changes, host name bindings. ● Testing Clustered environments. ● Run tests against up and running server.
  • 6. Unit Vs Integration Tests Unit Tests: ● Focused on defining (not testing) the behavior of a particular class, and that class only. ● Fast (less than 0.1 second per test) ● No external implementation dependencies (filesystem, database, web services, etc.). All dependencies are faked for the test context. ● Can easily be parallelized, since each test is atomic Integration Tests: ● Focused on verifying the integration of one or more components together. ● May have external dependencies. (in fact, it is likely testing the integration with this dependency) ● A test that takes longer than a unit Test should (longer than 0.1 seconds per test)
  • 7. Integration Tests Vs Platform Tests Integration Tests - with in wso2 product ● Executes on product pack created by build. ● Not depending on other product environments. ● Independent. ● Lightweight. ● Covers only scenarios related to features on individual product. Platform Tests: ● Can run on a configured ( With mounts , Clusters ...) product packs and already up and running server. ● Can generate scenarios based on multiple product environments. ● Can execute load and UI tests
  • 8. Architecture Overview ● Follows TestNG Annotations bases Execution Structure. ● Operations based on TestNG Listeners. ○ Server startup/Shutdown. ○ Emma instrumentation, Report Generation And Cleaning. ○ Artifact Deployment /Artifact cleaning. ○ Tennent Creation and Registering. ○ Report Generation. ● Test Optimized API. Reference:- http://www.ibm. ● Utility Classes to Support test cases. com/developerworks/java/library/j-testng/
  • 9. Execution Template for Clarity Execution Started @BeforeSuite @BeforeTest @BeforeClass @BeforeGroups @BeforeMethod @AfterMethod @AfterGroups @AfterClass @AfterTest @AfterSuite Execution Closed
  • 10. TestNg Listeners ● Listeners are interfaces allows to modify TestNG's behavior. ● Listeners are binned to a testNg execution. ● Listeners implement the interface org.testng.ITestListener ○ IExecutionListener ■ Triggers at start and end of any execution. ■ ISuiteListener. ○ ■ Triggers at suite start and end.ITestListener ■ Triggers at Test start, Finish, Failure, Skip and partial failure. ● Reporters implement the interface org.testng.IReporter ○ Notified when all the suites have been run by TestNG. ○ The IReporter instance receives a summary of entire test run
  • 11. Usage of Listeners in Clarity ● PlatformExecutionManager (IExecutionListener) ○ onExecutionStart() ■ Emma instrumentations ■ Server start ○ onExecutionFinish() ■ Server Sutdown ■ Emma report generation ● PlatformSuiteManager (ISuiteListener) ○ Set environment properties ex- Key Store Paths ○ Populate Users.
  • 12. Usage of Listeners in Clarity cont.d ● PlatformTestManager (ITestListener) ○ On Start ■ Artifact Deployment ○ On Finish ■ Artifact Clean up ● PlatformReportManager (IReporter) ○ Generate TestNg Report ○ Generate sure-fire report ○ Export data for Dashboard
  • 14. Artifact Repository |-- AS | |-- aar ● Location for keeping all artifacts | | |-- Axis2 Service.aar | |-- car | | `-- AxisCApp-1.0.0.car needs for your Test |-- BPS | `-- bpel | |-- CleanUpTest1.zip| ● Refers by automated Artifact |-- BRS | |-- aar | |-- rsl deployment process | `-- ruleservice | `-- GreetingService.aar |-- DSS ● Manages my file structure | |-- dbs | | |-- csv |-- ESB depending on product and artifact | |-- car | | |-- DemoProxy-1.0.0.car | |-- endpointlookup.xml type. |-- GREG | |-- artistRegistry.gar |-- GS | `-- gadget | `-- HelloWorldGadget.xml |-- IS | |-- IIA001Policy.xml `-- MS `-- jszip `-- schemaTest1.zip
  • 15. Clarity Properties ● File Location <FRAMEWORK_HOME>/core/org.wso2.automation.platform. core/src/main/resources/framework.properties # Testing server details ● Contains all information #------------------------------------------------------------------------------------- -------------- stratos.test=false about your environment. port.enable=true carbon.web.context.enable=false service.deployment.delay=30000 cluster.enable=false ● To configure WSO2 clarity product.list=GREG deployment.framework.enable=false for your environment and deployment.framework. home=/home/krishantha/automation/deployment-framework configure package details coverage.enable=false greg.carbon. home=/home/dharshana/latestPack/gregPack2/wso2greg-4.0.0- SNAPSHOT as.host.name=localhost as.http.port=9764 as.https.port=9444 #as.webContext.root
  • 16. Manage Tenants ● File Location ● <FRAMEWORK_HOME>/core/org.wso2.automation.platform. core/src/main/resources/tenantList.csv ● <FRAMEWORK_HOME>/core/org.wso2.automation.platform. core/src/main/resources/usertList.csv "0","admin","admin123" "1","admin123@wso2manualQA0002.org","admin123" "2","admin123@wso2manualQA0004.org","admin123" "3","admin123@wso2manualQA0006.org","admin123" "4","admin123@manualQA0001.org","admin123" "5","admin123@krishantha.hhh","admin123" "6","admin123@wso2autoQA0008.org","admin123" "7","admin123@wso2autoQA0009.org","admin123" "8","admin123@wso2autoQA0010.org","admin123" "9","admin123@wso2autoQA0011.org","admin123" "10","admin123@wso2autoQA0012.org","admin123" "11","admin123@wso2autoQA0013.org","admin123" "12","admin123@wso2autoQA0014.org","admin123"
  • 17. Automated Artifact Deployment <?xml version="1.0"?> <scenarios> <scenario testName="org.wso2.automation.common.test.as. service.AARServiceSpaceInFileNameTest"> <products> <product name="AS"> <artifacts userId="1"> <artifact name="Axis2 Service.aar" type="aar"/> </artifacts> </product> </products> </scenario>
  • 18. Write First Clarity Test - Demo
  • 19. Reporting ● Includes TestNg reports ,Junit |-- reports | |-- BPSStructuredSuite Reports ( Sure Fire report), And | | |-- classes.html | | |-- FlowClient.html Emma Coverage report | | |-- FlowClient.properties ● Directories containing separate | | |-- FlowClient.xml | | |-- ForEachClient.html results for each suite ( Directory | | |-- ForEachClient.properties | | |-- ForEachClient.xml name is as same as the suite name). | |-- index.html ● Junit Reports ( Surefire reports). | |-- junitreports | | |-- TEST-org.wso2.automation. ● index.html (Dashboard for executed common.test.bps.mgts. BpelStructAct_FlowClient.xml test). | | |-- TEST-org.wso2.automation. common.test.bps.mgtst. BpelStructAct_forEachClient.xml