roessler-testing ohne assertions - Entwicklertag · @Test public void...

34
@roesslerj 1 Testautomatisierung ohne Assertions Dr. Jeremias Rößler https://retest.de

Transcript of roessler-testing ohne assertions - Entwicklertag · @Test public void...

Page 1: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 1

Testautomatisierung ohne Assertions

Dr. Jeremias Rößler

https://retest.de

Page 2: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 2

Role-Model: Unit-Testing

Page 3: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 3

Page 4: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 4

Page 5: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 5

passes

Page 6: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 6

Page 7: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 7

Page 8: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 8

Page 9: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 9

Page 10: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 10

Page 11: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 11

Page 12: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 12

Page 13: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 13

Page 14: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 14

Page 15: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 15

Page 16: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 16

Live Demo: SW Changes

Page 17: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 17

Page 18: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 18

Page 19: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 19

Page 20: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj

automatedregression test

≠test

20

Page 21: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj

automatedregression test

=version control

21

Page 22: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 22

Page 23: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 23

Page 24: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 24

Close the Gap:automated Tests

Page 25: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 25

Page 26: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 26

Live Demo: Breaking Test

Page 27: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 27

RecheckDriverfindElement(by.id()) FirefoxDriver

findElement(by.bestMatch())

GoldenMaster

Page 28: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 28

Multilocators

Page 29: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 29

Page 30: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 30

Live Demo: Unbreakable Changes

Page 31: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 31

https://twitter.com/alanpage/status/1128798933306597377

Page 32: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 32

https://github.com/retest/recheck-web

Page 33: roessler-testing ohne assertions - Entwicklertag · @Test public void extended_xml_should_be_removed_correctly() throws Exception { // Prepare state final String xml = + "\n"

@roesslerj 33