how to write ui automated tests
TRANSCRIPT
HOWto write
UI automated tests
SHALL TALK ABOUT:
Stages of test development
Reviewing the Tools: basic stack and setting up the environment
How to build your tests project architecture
How to write your first test
Using PageObject design pattern
Let’s summarize
STAGES OF TEST DEVELOPMENT:
Creating
Debugging
Failure analysis
Stabilization
Modification
Continuous Integration Server
Jenkins, TeamCity, CruiseControl, Bamboo Repository: Git
Builder Maven, Gradle, Ant, NAnt, Rake, MSBuild
Programming language:Java, Python, Ruby, JavaScript...
FrameworkProtractor, Jasmine for JS; JUnit, TestNG for Java; NUnit, Gallio for .Net; RSpec, Cucumber for Ruby IDE:
Webstorm, PhpStorm, Intellij IDEA, PyCharm,Notepad++ (:
Tests (code)
Driver of the testing system WebDriver, TestComplete, QuickTest Pro
Browser FF, Chrome, IE…
Application
AUTOMATION STACK
Continuous Integration Server Jenkins Repository: Git
Builder
Programming language:
JavaScript
Framework Protractor, Jasmine
IDE:WebstormTests (code)
Driver of the testing system WebDriver
Browser FF, Chrome, IE…
Application
TOOLS THAT I USE
CODE ARCHITECTURE
helpers (your improved methods)
MY_TESTS (this is root)
pages (your pageObjects)
spec (your tests)
target (folder for storing generated reports)
package.json
config.js
README.md
FINALLY
Fragments reuse
Separation of aspects (architecture)
Design patterns usage
Make clear titles
Comments and other documentation
Refactoring tests
Existing libraries usage
➔ Data separated from logic
➔ Configuration separated from logic
➔ Code divided into layers: initialisation allocated / exposure and checks allocated
If you have WebDriver APIs in your test methods, You're Doing It Wrong.
Simon Stewart