English Version of presentation for the "You don't need automation engineer" talk, given (in russian) at SQA Days 2015.
You can watch the "screencast" try-out cut at https://youtu.be/TZhbI-JPdG0
11. Choosing high priority functionality
Tree
shleep *
eat *
run *
hang *
Holes
shleep *
eat *
run *
During All activities:
sh-shispering
Special Cases: *
GIVEN shleeping
WHEN 2 meters to somebody
THEN become invisible
Transitions:
tree > holes *
tree < holes *
12. To implement first & fast
Tree
shleep *
eat *
run *
hang *
Holes
shleep *
eat *
run *
Transitions:
tree > holes *
tree < holes *
13. Scenario (End to End)
go to hole
run
go to tree
hang
eat
go to hole
shleep
14. Tracking coverage
Tree
shleep
eat e
run
hang e
Holes
shleep e
eat
run e
During All activities:
sh-shispering
Special Cases:
GIVEN shleeping
WHEN 2 meters to somebody
THEN become invisible
Transitions:
holes > tree e
holes < tree e
17. ActionsContext Holes Tree sh-shispering?
run !!e ! !
hang - !!e !
eat !! !!e !
shleep !!e !! !
- shleep invisible ? !! !
Transitions:
holes > trees e
holes < trees e
18. ActionsContext Holes Tree sh-shispering?
run !!e ! !
hang - !!e !
eat !! !!e !
shleep !!e !! !
- shleep invisible ? !! !
Transitions:
holes > trees e
holes < trees e
hole in coverage
19. E2E
go to hole
run
go to tree
hang
eat
go to hole
shleep
1-Feature test
go to tree
shleep invisible
Finalise smoke coverage
20. E2E
go to hole
run
go to tree
hang
eat
go to hole
shleep
1-Feature test
go to tree
shleep invisible
assert shispering
Use possibilities to improve coverage
21. ActionsContext Holes Tree sh-shispering?
run !!e ! !
hang - !!e !
eat !! !!e !
shleep !!e !! !
- shleep invisible ? !!f !f
Transitions:
holes > trees e
holes < trees e
22. Done with Smoke? - Proceed to Full Acceptance with FT
ActionsContext Holes Tree sh-shispering?
run !!e !f !f
hang - !!e !e
eat !!f !!e !f
shleep !!e !!f !f
- shleep invisible ? !!f !f
27. ActionsContext Holes Tree sh-shispering?
run !!e ! !
- fast
- slow
? ?
hang - !!e !
- low
- high
? ?
eat !! !!e !
- much
- a bit
? ?
shleep !!e !! !
- shleep invisible ? !!e !
No “different values” checks
28. ActionsContext Holes Tree sh-shispering?
run !!e ! !
- fast
- slow
hang - !!e !
- low
- high
eat !! !!e !
- much
- a bit
shleep !!e !! !
- shleep invisible ? !!e !
No “different values” checks
different variations
of same “function”
29. Should be covered
on “unit testing” level
different variations
of same “function”
- fast
- slow
- low
- high
- much
- a bit
(giving the same
“user flow”)
30. We are here => => Only:
functional
high priority
use cases
different variations
of same “function”
Here =>
38. go to hole
run
go to tree
hang
eat
go to hole
shleep
Scenario (End to End)
39. Scenario (End to End)
given at todomvc
add "a"
toggle "a"
filter active
filter completed
edit "a" to "a edited"
toggle "a edited"
…
40. Add expected results
given at todomvc
add "a"
toggle "a"
filter active
assert no tasks
filter completed
edit "a" to "a edited"
toggle "a edited"
assert no tasks
…
41. Implicit checks are ok in “nearest steps”
given at todomvc
add "a"
toggle "a"
filter active
assert no tasks
filter completed
edit "a" to "a edited"
toggle "a edited"
assert no tasks
…
43. Let’s start coding ;)
given at todomvc
add "a"
toggle "a"
filter active
assert no tasks
filter completed
edit "a" to "a edited"
toggle "a edited"
assert no tasks
…
44. Help computer to read it in Java
givenAtTodoMVC();
add("a");
toggle("a");
filterActive();
assertNoTasks();
filterCompleted();
edit("a", "a edited");
toggle("a edited");
assertNoTasks();
//…
45. public class TodoMVCTest {
@Test
public void testTasksLifeCycle(){
givenAtTodoMVC();
add("a");
toggle("a");
filterActive();
assertNoTasks();
filterCompleted();
edit("a", "a edited");
toggle("a edited");
assertNoTasks();
//...
}
}
46. public class TodoMVCTest {
@Test
public void testTasksLifeCycle(){
givenAtTodoMVC();
add("a");
toggle("a");
filterActive();
assertNoTasks();
filterCompleted();
edit("a", "a edited");
toggle("a edited");
assertNoTasks();
//...
}
}
?
47. public static void givenAtTodoMVC(){
open("https://todomvc4tasj.herokuapp.com/");
newTask.shouldBe(enabled);
}
givenAtTodoMVC();
72. End to End
go to hole
run
go to tree
hang
eat
go to hole
shleep
Unit/1-feature-per-test
go to tree
shleep invisible
Coverage Style
73. End to End Unit/1-feature-per-test
Coverage Style
public void testFiltering(){
givenAtTodoMVC();
add("a");
toggle("a");
filterActive();
assertNoTasks();
filterCompleted();
edit("a", "a edited");
toggle("a edited");
assertNoTasks();
//...
}
public void testDelete(){
givenAtTodoMVC();
add("a");
delete("a");
assertNoTasks();
}
74. End to End Unit/1-feature-per-test
Advantages
+ more coverage in
less time with less
efforts during POC
implementation
+ integration
coverage
+ in case of bugs, gives
more complete report
+ easier to identify
reason from the report
=>
+ less time and efforts in
support
75. End to End Unit/1-feature-per-test
When to use?
+ when start, during
POC for framework
+ in a rush to cover a
lot of existed features
+ for integration
coverage
+ for new features
+ after POC is
approved, on regular
basis
78. Java: Selenide
Python: Selene is coming…
C#: NSelene is coming…
Ruby: Capybara
? JavaScript: Protractor
? PHP: Codeception
79. How to start?
Choose language
Learn language (books, interactive tutorials,
koans, exercism.io, google.com, etc.)
Choose Easy Tools
Find a mentor (friend, dev on your project, it-chats,
forums, etc…)
Go :)
80. Choose language?
Have project?
=> choose language of project’s developers
Have no project but want to find work fast?
=> choose one of the most popular language
Have no project but want to code in your style, and it
does not matter how long will you seek for the job?
=> choose language that fits you
81. No ready easy tool for your
language?
Lack of knowledge?
=> ask project’s developers to write it for you
Brave?
=> implement it by your own
82. Afterwords
There are good practices in context,
but there are no best practices.
(c) Cem Kaner, James Bach