Quality For Developers
What do you think ??????
Testing Good Bad And Ugly
Understanding - Cost of test Wrong way
Understanding - Cost of test Right way
"Agile Development" is an umbrella term for several
iterative and incremental software development
methodologies
Basic Understanding - Unit Test
● Focused on testing behavior of a
particular class, module or method.
● Smallest part of the application.
● 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
Basic Understanding - Integration Test
● Focused on verifying the integration
of one or more components together.
● May have external dependencies.
● A test that takes longer than a unit
Test should
Integration Tests - with in WSO2
● Executes on product pack created by build.
● Not depending on other product environments.
● Independent.
● Lightweight.
● Covers only scenarios related to features on individual product.
How tests really looks like
Platform - Platform Tests
Cross Platform Tests
Product - Integration Tests
Component
- Unit Tests
Component
- Unit Tests
Component
- Unit Tests
Component
- Unit Tests
Product - Integration Tests
Component
- Unit Tests
Component
- Unit Tests
Component
- Unit Tests
Component
- Unit Tests
Product - Integration Tests
Component
- Unit Tests
Component
- Unit Tests
Component
- Unit Tests
Component
- Unit Tests
Product - Integration Tests
Component
- Unit Tests
Component
- Unit Tests
Component
- Unit Tests
Component
- Unit Tests
● Platform scenarios.
● Integration scenarios.
● UI scenarios.
● Real world use cases.
● Performance and Security scenarios.
● Patches provided.
Technologies for Automation
Test Framework Build Systems
Code Coverage
Extensibility Support
UI Automation
●
●
●
○ Trigger out TestNg.
○ Control TestNG flow (Through Surefire TestNg Utils)
○ Generate reports. (Html, XML and emailable report)
Execution Started
@BeforeSuite
@BeforeTest
@AfterTest
@AfterSuite
Execution Closed
@BeforeClass
@BeforeGroups
@BeforeMethod
@AfterMethod
@AfterGroups
@AfterClass
● 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
●
○ Offline instrumentation
○ On fly instrumentation
●
●
○ Code coverage
○ Class coverage
○ cyclomatic complexity
● Reduces the amount of duplicated code.
● Encapsulate the internal state of a page into a single
page object.
● UI changes only affect to a single Page Object, not to
the actual test codes.
● Code reuse: Able to use the same page object in a
variety of tests cases.
Page Object
Class
Mapper.properties
Test Class
Questions?
Contact us !

Quality for developers

  • 1.
  • 2.
    What do youthink ??????
  • 3.
  • 4.
    Understanding - Costof test Wrong way
  • 5.
    Understanding - Costof test Right way
  • 6.
    "Agile Development" isan umbrella term for several iterative and incremental software development methodologies
  • 7.
    Basic Understanding -Unit Test ● Focused on testing behavior of a particular class, module or method. ● Smallest part of the application. ● 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
  • 8.
    Basic Understanding -Integration Test ● Focused on verifying the integration of one or more components together. ● May have external dependencies. ● A test that takes longer than a unit Test should Integration Tests - with in WSO2 ● Executes on product pack created by build. ● Not depending on other product environments. ● Independent. ● Lightweight. ● Covers only scenarios related to features on individual product.
  • 9.
    How tests reallylooks like Platform - Platform Tests Cross Platform Tests Product - Integration Tests Component - Unit Tests Component - Unit Tests Component - Unit Tests Component - Unit Tests Product - Integration Tests Component - Unit Tests Component - Unit Tests Component - Unit Tests Component - Unit Tests Product - Integration Tests Component - Unit Tests Component - Unit Tests Component - Unit Tests Component - Unit Tests Product - Integration Tests Component - Unit Tests Component - Unit Tests Component - Unit Tests Component - Unit Tests
  • 10.
    ● Platform scenarios. ●Integration scenarios. ● UI scenarios. ● Real world use cases. ● Performance and Security scenarios. ● Patches provided.
  • 12.
    Technologies for Automation TestFramework Build Systems Code Coverage Extensibility Support UI Automation
  • 13.
    ● ● ● ○ Trigger outTestNg. ○ Control TestNG flow (Through Surefire TestNg Utils) ○ Generate reports. (Html, XML and emailable report)
  • 14.
  • 15.
    ● Listeners areinterfaces 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
  • 16.
    ● ○ Offline instrumentation ○On fly instrumentation ● ● ○ Code coverage ○ Class coverage ○ cyclomatic complexity
  • 17.
    ● Reduces theamount of duplicated code. ● Encapsulate the internal state of a page into a single page object. ● UI changes only affect to a single Page Object, not to the actual test codes. ● Code reuse: Able to use the same page object in a variety of tests cases. Page Object Class Mapper.properties Test Class
  • 18.
  • 19.