Saturday, March 30, 2019

You Have One Job: a #30DaysOfTesting Testability #T9y Entry

It's the weekend, and I am nine posts away from finishing this challenge. Let this be a lesson to everyone out there, don't let time get away from you. Just because you can write ten blog posts in a day doesn't mean you should. Live blogging is an exception.

My rules, I made them up ;).

Anyway, more "30 Days of Testability". Let's do this.

Unit tests provide insight into an applications testability. Pair with a developer to explore some unit tests.

We have had a longstanding rule that done isn't really done until unit tests are in place. We have a variety of work styles. Some do their unit tests first as a "Test Driven Development" approach and others do them afterward. For those who do the former, they've said that it doesn't save them time up front but it helps them stay focused and they reap benefits down the road. for those who don't do the TDD approach, they typically say that it's mostly because of how they think. They prefer to tinker with ideas and see where they will lead first and that TDD messes with that. Who is right? Probably both of them. Regardless, no stories cross the line without unit tests so they get done one way or another :).

As for myself, I've been experimenting with two unit test runners for the purpose of a new automation framework approach. as we are looking at Cucumber JVM, I've been working with both JUnit and TestNG. Both are interesting in what they do and how they glue things together. I find myself thinking in the JUnit frame of mind mainly because I've used it several times over my career, while TestNG is a newer approach. We also have a variety of unit test frameworks in pay for our front end code (Jasmine and Protractor being two examples). I definitely value looking through them as they give me a clearer idea as to what each method and module is capable of handling. I especially like looking into the error handling, though I wonder if my teammates feel the same way ;).

In any event, if you want to give yourself a boost in understanding your application, unit test reading and discussing is a pretty good approach. 

No comments: