testing

Testing tools, testing philosophy & methodology...
2016-01-31T11:59:08.000062Z

@agile_geek: have you used test.check at all?

agile_geek 2016-01-31T12:21:32.000063Z

@paulspencerwilliams Briefly on toy code. I struggle to understand how to check on anything except put algorithmic problems. For example, how would u use property based testing for a RESTful API or a web page?

agile_geek 2016-01-31T12:23:46.000064Z

S/put/pure/

2016-01-31T12:24:47.000065Z

@agile_geek: yeah, the further the SUT gets from being a simple function, the harder it is. At least that’s my perception.

agile_geek 2016-01-31T12:26:03.000066Z

Mine too but I suspect I could use property based testing more.

2016-01-31T12:28:14.000067Z

As you might have read ^^ I’m converting some example based tests to generative style for a simple kata I played with a couple of weeks ago. This morning has been lots of headbanging, but I think I’m making progress. It’s hard letting go of examples though.

agile_geek 2016-01-31T12:28:55.000068Z

@paulspencerwilliams: can you share when you've finished..I might learn something.

2016-01-31T12:29:46.000070Z

@agile_geek: Yes! I promised @nberger last week. I intend to write a blog with before / after commits, and maybe some deliberately broken SUT to see how easily the tests would pick it up.

1
agile_geek 2016-01-31T12:36:07.000071Z

@paulspencerwilliams: excellent!

2016-01-31T12:38:41.000072Z

@agile_geek: oh, my first passing test!

donaldball 2016-01-31T17:06:21.000073Z

@agile_geek you might find this talk interesting or inspirational: https://www.youtube.com/watch?v=Y2jQe8DFzUM

donaldball 2016-01-31T17:10:14.000074Z

for a restful api, you might e.g. use test.check to generate a sequence of calls, then assert that the state of the system is correct afterwards. You might assert that the only resources that exist were those that were created and never deleted, and that their contents are those of the last update or create.