Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concordion. You've been there... starting a project with great intentions but, 6 months down the line, you're sitting in front of another plate of spaghetti.

Similar presentations


Presentation on theme: "Concordion. You've been there... starting a project with great intentions but, 6 months down the line, you're sitting in front of another plate of spaghetti."— Presentation transcript:

1 Concordion

2

3 You've been there... starting a project with great intentions but, 6 months down the line, you're sitting in front of another plate of spaghetti. How can we stop it?

4 Clean code expresses its logic clearly. It's well presented and makes good use of abstraction to hide irrelevant details. Or to put it simply...

5 It's readable.

6 So, focus relentlessly on readability. Not just in code, but in everything: Build scripts, class names, log files, story cards, acceptance tests, method names, s, unit tests, management reports, etc.

7 Don't tolerate acceptance tests written like this...

8

9 Use Concordion and write them like this instead...

10

11 Clear tests lead to clear fixture code

12 Notice you are not forced to use tables or a "Given... When... Then..." structure

13 "Given... When... Then..." is an excellent thinking tool, but it's not a natural way to explain things. Concordion lets you focus on readability.

14

15

16

17

18

19 Visibility to Management A huge benefit of having readable tests is that managers can actually read them and gauge their quality. This provides the team with an incentive for writing them well and not cutting corners.

20 Tables,,, Paragraphs Bold Headings You don't need to know much HTML to use Concordion...

21 A Worked Example of Concordion

22

23

24 Although this HTML might look a bit complicated, most of it is just a template. You only need to worry about the bits in the middle...

25

26 Now, highlight the key phrases in bold...

27

28

29 Once agreed, the developer can instrument it with hidden attributes that communicate with the fixture...

30

31 Here's our base fixture...

32

33 If we run it with JUnit, then currently it will fail...

34

35 The test output is written to a file in the temp directory*... * You can change this via a system variable, if you like.

36

37 Let's add the missing method and run it again...

38

39

40 It still fails, so let's get it to pass. Normally this would be a call to the system under test, but for this demo we'll just implement it in the fixture...

41

42

43

44 There are versions for... Java.NET Ruby Python

45

46 Coaching Although Concordion is very easy to use, the way of thinking - distilling and decomposing behaviours - can take some to get used to. I'm an independent consultant based in London, UK. Please contact me if you would like some help getting your team off on the right track with Concordion. David Peterson


Download ppt "Concordion. You've been there... starting a project with great intentions but, 6 months down the line, you're sitting in front of another plate of spaghetti."

Similar presentations


Ads by Google