Architecture of automated test cases for legacy applications

50
Architecture of automated test cases for legacy applications MYKHAYLO VASYLCHENKO

Transcript of Architecture of automated test cases for legacy applications

Page 1: Architecture of automated test cases for legacy applications

Architecture of automated test cases

for legacy applications

MYKHAYLO VASYLCHENKO

Page 2: Architecture of automated test cases for legacy applications

Agenda

● Projects● Problems● Test cases architecture● Outcome● Questions

Page 3: Architecture of automated test cases for legacy applications

Projects

Page 4: Architecture of automated test cases for legacy applications

● Java● Linux remote servers● JBOSS● Oracle Weblogic● Oracle Coherence● DB● Web UI● SOAP/http● REST/http

Technologies

Page 5: Architecture of automated test cases for legacy applications

•Legacy applications in diverse ecosystem•Complex pipelines

Legacy Apps

Page 6: Architecture of automated test cases for legacy applications

Testing tool - CA LISA

Page 7: Architecture of automated test cases for legacy applications

● Started with 6 people in early 2014

● 11 people in the end of 2014

The Team

Page 8: Architecture of automated test cases for legacy applications

21 projects during 2014Around 3 test cases/man/day

Our Commitment

Page 9: Architecture of automated test cases for legacy applications

Covered only 3 projects(from 21)

4 Month Later...

Page 10: Architecture of automated test cases for legacy applications

Problems

Page 11: Architecture of automated test cases for legacy applications

DuplicatesAppending

Dependence

3 Major Problems

Page 12: Architecture of automated test cases for legacy applications

Big automation team

● Code duplication● Support issues

Duplicates

Page 13: Architecture of automated test cases for legacy applications

Duplicates

Page 14: Architecture of automated test cases for legacy applications

Extending for reuse...

● Huge methods● Hard to maintain

Appending

Page 15: Architecture of automated test cases for legacy applications

BeginningAppending

Page 16: Architecture of automated test cases for legacy applications

BeginningAppending

Page 17: Architecture of automated test cases for legacy applications

The team is dependent on:- quality of manual test cases- environment- developers

Manual QA – USA, Vietnam, IndiaEnvironment - USADevelopers – USADeployment and Automation – Ukraine

● Hard troubleshooting ● Communication takes ~80% of time

Dependence

Page 18: Architecture of automated test cases for legacy applications

Test case: Search for “User Name” and “all of these”1. Set valid “user name” to “find” field2. Select “all of these” condition3. Select “User Name” field4. Click “Search” button

Expected result:Grid with correct data is appeared

Dependence

Page 19: Architecture of automated test cases for legacy applications

Test is failed.WHY???

Dependence

Page 20: Architecture of automated test cases for legacy applications

Test is failed.Because of SQL query should be another:

Dependence

Page 21: Architecture of automated test cases for legacy applications

Legacy Apps

Page 22: Architecture of automated test cases for legacy applications

Legacy Apps

Missing relevant documentation

Page 23: Architecture of automated test cases for legacy applications

Legacy Apps

Missing relevant documentation

Missing key developers

Page 24: Architecture of automated test cases for legacy applications

Legacy Apps

Missing relevant documentation

Missing key developers

Missing momentum

Page 25: Architecture of automated test cases for legacy applications

Test cases architecture

Page 26: Architecture of automated test cases for legacy applications

Start from test cases

False Start

Page 27: Architecture of automated test cases for legacy applications

Start from test casesStart from analysis

False Start

Page 28: Architecture of automated test cases for legacy applications

Analysis

Test ID Test Name

001 Verify search for “User Name” field and “all of these” condition

002 Verify search for “User Name” field and “starts from” condition

003 Verify search for “User Name” field and “ends with” condition

004 Verify search for “City” field and “all of these” condition

005 Verify search for “City” field and “starts from” condition

…. ……

n Verify search for “State” field and “equals” condition

Page 29: Architecture of automated test cases for legacy applications

•We know functionality•We know different scenarios•We know common actions

parameters it should take and what actions it should perform

Encapsulation

Page 30: Architecture of automated test cases for legacy applications

Create mock-upsEncapsulation

Page 31: Architecture of automated test cases for legacy applications

● Get input and call method● Actions are "hidden" in methods

Met

hods

Test 1

Test 2

Test N

Test Cases

Page 32: Architecture of automated test cases for legacy applications

Test Cases

Page 33: Architecture of automated test cases for legacy applications

Real test cases + mocked methods = 80% done

TDD Style

Results

PASSED

FAILED

Page 34: Architecture of automated test cases for legacy applications

Fill mock-ups with real code

Coding

Page 35: Architecture of automated test cases for legacy applications

CodingMock up

Page 36: Architecture of automated test cases for legacy applications

AutomationReal

Page 37: Architecture of automated test cases for legacy applications

•Run tests•Review results

Ready

Page 38: Architecture of automated test cases for legacy applications

Outcome

Page 39: Architecture of automated test cases for legacy applications

No Duplicates when applying architectural approach

Duplicates

Page 40: Architecture of automated test cases for legacy applications

BEFORE

Duplicates

AFTER

Page 41: Architecture of automated test cases for legacy applications

●Know your features●Implement optimal methods from scratch

Appending

Page 42: Architecture of automated test cases for legacy applications

AppendingBEFORE

Page 43: Architecture of automated test cases for legacy applications

Appending

AFTER

Page 44: Architecture of automated test cases for legacy applications

•Test case is failed but automated

Dependence

Page 45: Architecture of automated test cases for legacy applications

•Test case is failed but automated•The reason is documented

Dependence

Page 46: Architecture of automated test cases for legacy applications

•Test case is failed but automated•The reason is documented•Resolved when feedback is provided

Dependence

Page 47: Architecture of automated test cases for legacy applications

Postponed Troubleshooting

Never stop and never closely investigate the problem

Page 48: Architecture of automated test cases for legacy applications

Aggressive Automation

Page 49: Architecture of automated test cases for legacy applications

21 projects are covered by automation5300 test cases automated

65% test cases – passed35% - failed due to reasons not dependent on

automation team

Outcome

Page 50: Architecture of automated test cases for legacy applications

Questions?

Mykhaylo [email protected]