(keys clicking) - Done, I've created the perfect game, it's ready to be released to our customers. - Did you test it - Kind of, I checked to make sure it meets all the requirements we came up with. - But what happens if a player does something unexpected with the game? Or they use it in a way that wasn't captured in our set of requirements? - Why would they use a perfectly good game wrong? - Perhaps they misunderstood how to play it, or maybe they mistyped something, or maybe they're just mischievous and want to push the boundaries to try and break it.
- Well, if they just read the documentation I wrote, they know exactly how to use it. - Documentation, getting starter guides, and training are all good, and can help make a basic user become a power user. The software should be easy and intuitive to use. Imagine we're building an online version of this game, and we ask them to enter their phone number when creating an account. How many digits should we allow the user to enter? - 10 obviously, three for the area code, seven for the rest. - Sure that works if we only have users in North America.
But there are plenty of countries where the phone numbers aren't 10 digits, or if they are, it's not necessarily true that the first three are reserved as an area code. Now imagine that you do enter the 10 digits for your phone number, but the application refuses to accept it. It says it's an invalid input, what would you think? - It sounds to me like somebody else wrote a buggy piece of software. - [Olivia] What if I told you that's because the input was expecting dashes to separate the area code from the rest of the number? - How was I supposed to know that? - See, these are some of the usability considerations you've got to keep in mind when creating software.
- Shouldn't that have been outlined as part of a use case or something? - Yes, some issues will come up when creating use cases, but we can never anticipate how all our users will choose to use our software. A good thing to always keep in mind is that if there's an optional field, input, or tool, there will always be a user that tries to use it in a way that we were not intending them to. Proper error messages and prompts go a long way to help guide them. - [Male] Testing all of those scenarios sounds pretty tedious. - It sure can be. And no one really wants to spend hours, days, or even weeks, testing the same thing over and over again.
That's why creating automated unit tests and system tests as you develop your program is invaluable. Not only will it keep you from doing the same tedious tests over and over again, as things change you can more readily find out if something breaks after that change. - That reminds me of when I've upgraded software before, and suddenly things that had been working fine, stopped working at all. - [Olivia] It's a common complaint when users upgrade software. And it's often caused by developers refactoring between the code releases. Maybe they've discovered a better way to implement a part of the solution, or maybe refactoring was necessary to allow them to add a new feature.
Whatever the case may be, refactoring is a natural part of maintaining software over time. - Well shouldn't they have tested it to make sure everything still works the same as before? - They should, and having a well established automated testing system that properly mimics how users interact with the software will help with that. - All right, Olivia, you can get off your soap box. You've convinced me. As exciting as releasing software can be, developing and running a proper test system is just as important as developing he application itself.
I guess it's time I check out some other courses on LinkedIn Learning to learn more about software testing.
- Object-oriented basics: objects, classes, and more
- Defining requirements
- Identifying use cases, actors, and scenarios
- Domain modeling
- Identifying class responsibilities and relationships
- Creating class diagrams
- Using abstract classes
- Working with inheritance
- Developing software with object-oriented design principles