Skip to content

testing elixir apps #22

@StefanHoutzager

Description

@StefanHoutzager

TDD is well known in agile software development. But there is more, f.e. property-based testing and end-to-end testing, there are elixir libraries like hound https://semaphoreci.com/community/tutorials/end-to-end-testing-in-elixir-with-hound that support these.
It would be nice to hear about pragmatic approaches to testing and f.e. a demo with hound. Concerning the pragmatic approach James O. Coplien and David Heinemeier Hansson have written priceless notes.
F.e:

Be humble about what your unit tests can achieve,
unless you have an extrinsic requirements oracle for the
unit under test. Unit tests are unlikely to test more than one
trillionth of the functionality of any given method in a
reasonable testing cycle. Get over it. 

 If you write a test to cover as many possibilities as
possible you can dedicate a rack of machines to running the
tests 24 hours a day, 7 days a week, tracking the most
recent check-in. 

If you have a large unit test mass, evaluate the feedback
loops in your development process. Integrate code more
frequently; reduce the build and integration times; cut the
unit tests and go more for integration testing. 

The payoff in investment is higher in functional testing
than in unit testing: put your effort there. Functional testing
typically finds twice as many bugs as unit testing (see the
Capers Jones data a bit later in this column), even though
agile developers spend most of their time doing testing at
the unit level, including TDD.

http://david.heinemeierhansson.com/2014/tdd-is-dead-long-live-testing.html
http://rbcs-us.com/documents/Why-Most-Unit-Testing-is-Waste.pdf
http://rbcs-us.com/documents/Segue.pdf
http://david.heinemeierhansson.com/2014/test-induced-design-damage.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions