quality for developers

19
Quality For Developers

Upload: dharshana-warusavitharana

Post on 22-May-2015

141 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Quality for developers

Quality For Developers

Page 2: Quality for developers

What do you think ??????

Page 3: Quality for developers

Testing Good Bad And Ugly

Page 4: Quality for developers

Understanding - Cost of test Wrong way

Page 5: Quality for developers

Understanding - Cost of test Right way

Page 6: Quality for developers

"Agile Development" is an umbrella term for several iterative and incremental software development methodologies

Page 7: Quality for developers

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

Page 8: Quality for developers

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.

Page 9: Quality for developers

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

Page 10: Quality for developers

● Platform scenarios.

● Integration scenarios.

● UI scenarios.

● Real world use cases.

● Performance and Security scenarios.

● Patches provided.

Page 11: Quality for developers
Page 12: Quality for developers

Technologies for Automation

Test Framework Build Systems

Code Coverage

Extensibility Support

UI Automation

Page 13: Quality for developers

○ Trigger out TestNg.

○ Control TestNG flow (Through Surefire TestNg Utils)

○ Generate reports. (Html, XML and emailable report)

Page 14: Quality for developers

Execution Started@BeforeSuite

@BeforeTest

@AfterTest

@AfterSuite

Execution Closed

@BeforeClass

@BeforeGroups

@BeforeMethod

@AfterMethod

@AfterGroups

@AfterClass

Page 15: Quality for developers

● 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

Page 16: Quality for developers

○ Offline instrumentation

○ On fly instrumentation

○ Code coverage

○ Class coverage

○ cyclomatic complexity

Page 17: Quality for developers

● 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

Page 18: Quality for developers

Questions?