42
A talk by Claudia Ro u ș [email protected] @claudia_rosu Developer experience to Testing

Developer Experience to Testing

Embed Size (px)

Citation preview

Page 1: Developer Experience to Testing

A talk by Claudia Ro uș [email protected]@claudia_rosu

Developer experienceto

Testing

Page 2: Developer Experience to Testing

Agenda● Feature delivery● Tests in the delivery flow● Power of tests in practice● What's next● Core ideas

Page 3: Developer Experience to Testing

About me

● Software crafter● Experience with Groovy, Grails, Spock, Java● Active in communities

Page 4: Developer Experience to Testing

1. Feature delivery flow

Page 5: Developer Experience to Testing

Background● Innovative eHealth application for a general practitioner doctors association

● Client is not a product owner, nor a business analyst

● Development life cycle evolved over time

Page 6: Developer Experience to Testing

Development life cycle

Page 7: Developer Experience to Testing

2. Tests in the delivery flow

Page 8: Developer Experience to Testing

Testing strategy

Test one isolated behavior of an individual function

Test integration of the application with the database or the authentication plugin

Test a feature use case from request to save in the database

Test one isolated behavior of the UX

Page 9: Developer Experience to Testing

Implementing the strategy

Using tests for preventing regression bugs

Using tests for learning Grails framework faster

Building tests with Grails, Groovy and JUnit

Page 10: Developer Experience to Testing

Groovy and Grails

Grails is a powerful web framework, for the Java platform aimed at multiplying developers’ productivity thanks to a Convention-over-Configuration -

https://grails.org/

Groovy is a powerful, optionally typed and dynamic language for

the Java platform. - http://www.groovy-lang.org/

Page 11: Developer Experience to Testing

Time passes and

Package of tests to maintain

We want to get away without regression bugs

We know Grails&Groovy now

Future tests to write

Page 12: Developer Experience to Testing

Reduce tests number

Maximize the work not done

Invest in Software Design

Page 13: Developer Experience to Testing

Enjoying writing tests

Spock is a testing and specification framework for Java and Groovy applications. What makes it stand out from the crowd is its beautiful and highly expressive specification

language.http://spockframework.github.io/

Page 14: Developer Experience to Testing

Spock

Page 15: Developer Experience to Testing

Where we are now

Using tests for analysis

Using tests for software design

Using tests for checking definition of done

Building tests with Grails, Groovy and Spock

Page 16: Developer Experience to Testing

3. The power of tests in practice

Page 17: Developer Experience to Testing

Search patients

Page 18: Developer Experience to Testing

3.1 Analysis

Page 19: Developer Experience to Testing

Initial UINOM PRÉNOM NE(É) ADRESSE TEL

PATIENTS Sélection par MT

Page 20: Developer Experience to Testing

Front-end unit tests

Page 21: Developer Experience to Testing

Acceptance tests

Page 22: Developer Experience to Testing

Final UI

Page 23: Developer Experience to Testing

3.2 Software Design

Page 24: Developer Experience to Testing

3.2 Software Design

Page 25: Developer Experience to Testing

Front-end unit tests

Page 26: Developer Experience to Testing

Controller Unit tests

Page 27: Developer Experience to Testing

Back-end Unit tests

Page 28: Developer Experience to Testing

3.3 Checking definition of done

Page 29: Developer Experience to Testing

Running all the testsGrails test-app unit: running all unit tests →

Grails test-app integration: running all integration tests →

Grails test-app acceptance: running all acceptance tests →

Karma start running all jasmine unit tests →

Page 30: Developer Experience to Testing

Running all the tests

Page 31: Developer Experience to Testing

3.4 Demo

Page 32: Developer Experience to Testing

Acceptance tests report

Page 33: Developer Experience to Testing

And some manual tests

Page 34: Developer Experience to Testing

Results● Happy customer● Improved collaboration● Maximize the work not done● Faster development life cycle● Happy me

Page 35: Developer Experience to Testing

5. Next

Page 36: Developer Experience to Testing

Functional tests for acceptance

GEB = Browser automation tool.WebDriver + jQuery + Page Object + Groovy

= Easy to write & read functional tests

Functional testing answers questions like:“can the user do this”

“does this particular feature work”

Page 37: Developer Experience to Testing

Functional test example

Page 38: Developer Experience to Testing

5. Core ideas

Page 39: Developer Experience to Testing

4 Core Ideas1. Best prevention of undesired side effects

2. Best analysis tool I have ever used

3. Best and fastest feedback I have received

4. Best software design tool

Page 40: Developer Experience to Testing

Dev Test

Page 41: Developer Experience to Testing

Your Questions?

“The important thing is not to stop questioning”

[email protected]@claudia_rosu

Page 42: Developer Experience to Testing

Resourceshttp://www.groovy-lang.org/

https://grails.org/

http://spockframework.github.io/spock/docs/1.0/index.html

http://www.gebish.org/

http://mozaicworks.com/category/blog/testing/