Upload
andrii-soldatenko
View
55
Download
3
Embed Size (px)
Citation preview
High performance Functional tests
Andrii Soldatenko 31 January 2015 @a_soldatenko
About me:• Senior Test Automation Engineer at
• Backend Python Developer at
• Speaker at PyCon Ukraine 2014
• @a_soldatenko
• http://asoldatenko.com
"Tests are the Programmer’s
stone, transmuting fear into boredom."
We don’t have time for tests
Test Automation Pyramid
from http://martinfowler.com/bliki/TestPyramid.html
Unit tests
Integration tests
Functional or UI tests
How to automate Functional tests for Web?
Demo
Test Execution Time
• Faster Tests Mean Faster Development
• Slow Tests Don’t Get Run as Often
How to decrease test execution time?
“Man is a tool-using animal. Without tools he is nothing, with tools he is all.“ - Thomas Carlyle
Using requests instead of Selenium
Demo
Use Selenium Grid
Node
Node
Node
Hub
How to setup Selenium Grid locally
unittests in Pythonparallel
execution plugins test coverage
unittest NO NO NO
YES NO YES
YES YES NO
Selenium Grid + Concurrent test execution
Node
Node
Node
HubOR
Demo
Selenium Grid in Cloud
Demo
Use Selenium with PhantomJS
+
Demo
Functional tests for Django
Final Thoughts
• Don’t test constants
• Avoid double-testing functionality
• Collaboration on Step Definitions in BDD
• Use Continuous Integration
• Slow tests kill productivity
Questions
?
Thank You
@a_soldatenko
http://asoldatenko.com