3 ms·
Sure. First of all, even though you're clearly a developer (as you mentioned writing unit tests), I'd recommend starting at a higher level of abstraction with B
by ZenoArrow 10y ago
Sure. First of all, even though you're clearly a developer (as you mentioned writing unit tests), I'd recommend starting at a higher level of abstraction with BDD tools, basically anything that implements the Gherkin language (I can't tell you which BDD tool to use as I don't know what language you're coding in, if you can tell me I can give you a more specific recommendation). The idea behind this is that you're writing your code to meet a specification that your client can also work with, so you can be sure the specification you're coding against is what the client wants. As an added bonus, the Gherkin scripts form a type of living documentation, providing clear information about what the application does whilst also remaining up to date (so long as all tests must pass before a new version is sent out).
Second recommendation is to look into how to avoid test-induced damage, which is where code gets bloated and more complicated in order to make it more testable. One major source of problems in this area is the need to create mock objects. I'd recommend this video from Mark Seemann as a good starting point in this area, as it looks at how you can create unit tests without mocks:
https://www.infoq.com/presentations/mock-fsharp-tdd https://www.infoq.com/presentations/mock-fsharp-tdd
If you can let me know which language you're mostly coding in I'll see if I can give you some more recommendations.
- lovich 10y agoI'm doing 90%+ of my code in C#/vanilla JS at the moment. I was using moq to mock out my C# objects. Thanks for the help, by the way
- ZenoArrow 10y agoYou're welcome. As you're familiar with C#, I'd recommend SpecFlow. http://www.specflow.org/ http://www.specflow.org/ As you're also using JS I'm guessing you're creating web apps, so I can recommend Selenium if you want to automate front end tests. You can code Selenium tests with C# too, and you can also abstract away the details of the Selenium implementation to use SpecFlow to write the tests. If you have access to Pluralsight (if you have an MSDN licence check to see if it's bundled with your MSDN licence, I think I got a 45 course Pluralsight trial with my MSDN Enterprise licence), there's some good courses on Selenium and SpecFlow, including one that takes you through combining the two. http://www.seleniumhq.org/ http://www.seleniumhq.org/ https://www.pluralsight.com/ https://www.pluralsight.com/
- lovich 10y agoYou've got it right on the web apps. And thanks again, this should be a big help