ShowCase: Great Software Development Productivity with Real UI Test Automation & Continuous Testing
Implemented the core CRM Field Service within 3 days, part-time
For most software companies, automated End-to-End Testing and Continuous Testing (CT) are just slogans. For me, it means
Daily Deployment to production (if changes are made)
Great productivity boost, 10X or even 100X.
In the article, I will show how CT (executing automated E2E regression testing) assists me in implementing the Field Service (a core CRM feature) in WhenWise, in less than 3 days.
According to the official MS doc, “The Dynamics 365 Field Service business application helps organizations deliver onsite service to customer locations.” Let me illustrate this with an example.
The company WisePool does swimming pool maintenance. To complete a sale, the system creates a work order for the client, and schedules a booking of a technician to perform the service at customer locations (fields); The technician carries out the services based on the work order, where quite often, he needs to add/adjust some billing items; Once the job is done, the receptionist generates an invoice based on the completed work order.
WhenWise is our online service booking app, the idea and initial implementation were from my daughter (for her high-school project). I helped to make it a commercial app. Upon the customers’ requests, we have added many features such as Client Management, Internal Booking, Invoicing, .., etc.
2 days ago (July 5th), the idea of “WhenWise may serve as CRM” came to me. Therefore, I decided to add Field Service to WhenWise. Today (July 7th), the core (lifecycle of WorkOrder to Invoice) is done. Here is a video demo (from test automation execution).
How did I do it?
Use Test Automation and Continuous Testing extensively
More on this later.Deploy to the production on Green build (passing all tests)
Multiple deployments to the production daily while without affecting the customers using WhenWise.All work was done by myself at home, part-time.
Here the work means everything: analysing requirements, designing, database migration, coding, testing and deployment.
Besides that, I finished reading the novel “Evil under the Sun” and watched one EuroCup semi-final match. Of course, plus the usual out-shopping with my wife and two family movie nights (Amazon Prime) as well.No Jira, Defect Tracking, Burn Charts, Retrospectives, …, etc
I have never needed the above on my own software project and the client projects I had total control. Delivering the customers-most-wanted feature in the next hours is my priority. Thanks to our Continuous Testing (CT) process, I could usually achieve the goal.No Estimates
Obviously, I would rather spend time implementing the features and maintaining the automated tests.
Stats:
As you can see, there were several failed builds. I did introduce a handful of regression defects. I don’t want to think of what the damage would cause if they are not detected by regression testing. Thankfully, I have the safety net of over 500 Selenium End-2-End tests, running in the BuildWise CT server.
The Best Time to start Test Automation is: YESTERDAY
In numerous times while I worked on test automation consulting/contracting for some companies, I found the management postponed the introduction of test automation to the team. A common excuse was: “We are behind schedule.” However, the best answer to start (or learn) test automation is always YESTERDAY. Think about it: if there is an urgent production issue, surely the first priority is to fix it. However, without rapid (under an hour) and reliable regression testing, the fix could introduce more defects. We have seen these all the time, haven’t we?
The purpose of writing this article is not to brag about my development efficiency, as I have stopped programming for others since 2010 (there was only one exception in 2013, while I worked on a start-up for 2 months upon the business owners’ pleading). I simply want to show the amazing development efficiency in a real Agile/DevOps software team, with a good Continuous Testing process.
Q & A
1. Which activity takes most of the time?
Keep all regression testing (500+ in total) pass. Yes, the effort of implementing new features and the automated tests for them is small, maybe 40% if you really want a figure. As you can see, for every run of regression tests in BuildWise, I need to address all the features (i.e. user stories) implemented so far.
2. Did you break existing features?
Yes, a few times (see the red build in the above chart) on my local machine. On the first build (with database migration changes), 32 regression tests failed.
The automated regression saved my ass.
3. How do you develop so fast, without compromising on quality?
I believe, in software development, high quality enables high efficiency. Please read my other article: “Benefits of Continuous Testing (Part 4: to Developers)”. Also, here is the advice I received from my mentor, a renowned world-class programmer (who mentored me for 6 weeks in 2005), “Do solid test automation daily for 2 years, then you will understand how to design simply”.
“Do the simplest thing that could possibly work”
- Kent BeckSimple design is not “easy design”, most experienced programmers know that it is very very hard. Take Kent Beck’s design of JUnit as an exmaple.
My mentor is correct, after I had been doing test automation (during the day at work and nighttime at home) for over 2 years, I found that I implemented software features faster and faster with higher quality. That’s also why I was able to develop several highly-claimed apps (including an international award) in my spare time since 2007. I even fulfilled a dream that I had over 21 years ago: “develop a cool C++ app”.
For the readers who are really keen to know how I develop software: On any working day (since 2007), I use a coding editor (TextMate) and a testing IDE (TestWise) for development. My rough estimate of my time on these two tools: 30% on coding editor/IDE and 70% on TestWise.
4. Based on your video, the Field Service module is still incomplete?
That’s right, I only said the core is done. In other words, a field-service -type business may use WhenWise today, that’s what I care about. I am sure the customers will find some issues, such as when cancelling a booking, a status change will be reflected in the work order. Yes, I can implement and deploy the production tomorrow. To me, the important thing is that the customers can use the new feature now.
5. How can you find family time while doing all these?
Doing side-projects must not affect the family life much. The key, again, is to use test automation to improve efficiency. Common sense, isn’t it?
As you can see, a run of regression tests (500+ Selenium) takes about 36 minutes. During that time, I can do other things with the family. When I am back to coding/testing, I execute automated tests (viewing in a browser) quickly to bring back the memory and focus. Therefore, I don’t mind interruptions.