automated testing for web applications - wurbe #36

15

Click here to load reader

Upload: andrei-savu

Post on 06-May-2015

1.687 views

Category:

Technology


3 download

DESCRIPTION

Practical advices for testing web applications. Demo built using MongoDB, tornado & SMTP.

TRANSCRIPT

Page 1: Automated Testing for Web Applications - Wurbe #36

Automated Testing for Web Applications

Andrei Savu / @andreisavu

Wurbe #36 Bucharest @Adobe

Page 2: Automated Testing for Web Applications - Wurbe #36

Me

Student @UPB – Master Degree Co-Founder @thesunnytrail.com

Passion for clean code, testing & automation

@GSoC – Apache Zookeeper @Adobe – EXIF analytics for photoshop.com Speaker @Wurbe #2 #25

Page 3: Automated Testing for Web Applications - Wurbe #36

Outline

What is testing Types of testing Why automated testing Low - hanging fruits Demo Advices

… share advices from practice … things you can do starting from now

Page 4: Automated Testing for Web Applications - Wurbe #36

What is testing?

”Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test.” wikipedia

Does the product meet the requirements?

Did I broke something? #agility

Page 5: Automated Testing for Web Applications - Wurbe #36

Types of testing (1)

Internal visibility: black box & white box

Unit testing Integration testing Functional testing

System testing End-to-end testing

Page 6: Automated Testing for Web Applications - Wurbe #36

Types of testing (2)

Sanity / Smoke testing Regression testing

Acceptance testing Load & stress testing

Usability testing

Page 7: Automated Testing for Web Applications - Wurbe #36

Types of testing (3)

Install / Uninstall (deployment) testing Recovery testing Security testing Compatibity testing

Alpha testing Beta testing

source

Page 8: Automated Testing for Web Applications - Wurbe #36

Why automated testing?

Saves Time and Money Improves Accuracy Does What Manual Testing Cannot (scale) Improves Team Morale

source

Page 9: Automated Testing for Web Applications - Wurbe #36

Low - hanging fruits

Low Effort with Good Results (… and you don't have a QA team)

Unit, Integration & Functional Testing

Setup a Continous Integration server

Page 10: Automated Testing for Web Applications - Wurbe #36

1. Unit testing

For components with: No external dependencies Easy to mock dependencies

Keep them fast & run them often

Page 11: Automated Testing for Web Applications - Wurbe #36

2. Integration & functional testing

Orchestrate dependencies execution

Automated deployment solves the problem for complicated systems

Keep single tests fast enough

Page 12: Automated Testing for Web Applications - Wurbe #36

Demo

Typical Application: database, interface, email

Demo: MongoDB + tornado + SMTP

Sources: https://github.com/andreisavu/automatic-testing-demo

What's interesting? test orchestration, in-memory smtp

Page 13: Automated Testing for Web Applications - Wurbe #36

What about Sunnytrail?

Helping startups to track revenue metrics

Complete rewrite / Testable

Componets: MongoDB, Python, Tornado, Beanstalkd (queue), API & Dashboard, Background Processing, CLI Tools, SMTP

Page 14: Automated Testing for Web Applications - Wurbe #36

Final Advices

think about testing from the beginning

test early, test often & automate

not everything should be tested

make your life easier

Page 15: Automated Testing for Web Applications - Wurbe #36

Thanks! Questions?

Andrei Savu / @[email protected]