Monday, September 29, 2014

Software Testing For Developers

These days Software touches every aspect of our lives. Not only does it runs on personal computers like Smartphone or Smartwatches, but it is also present in every industry.
As vital as software has become, it's not perfect. After all, it's built by humans, and we are known to make mistakes from time to time.
To correct those mistakes in the software world we have software testing.

So what is Software Testing anyways?

Software testing is the process of analysis conducted to provide information about the quality of the product or service under test.
It can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs errors or other defects.

Making mistakes it's not the problem everyone does it, we are not machines that eat pizzas and write perfect code, we (the developers) are human beings too. We have software testing to address those mistakes. But the problem starts when developer finishes coding his/her software and says it is DONE! Without even considering testing as the part of the development life cycle.

Why I should care about testing?

No matter how good you are, you are not Chuck Norris! Sometimes you may end up working with other people's software and APIS that will not always work as intended, but you will assume that it does, or should, leading to a defects in your "perfect" case. In any of this cases we need to check everything and anything we produce because things can always go wrong.

The ABC of testing for Kids!

To get started with testing let's get a look at smoke testing, which is the very basic set of fundamental test cases  that you will need to run to make sure at least the basic functionality of the software remains rock-solid.  It does not guarantees software as release worthy but failing a smoke test will confirm that the software is certainly not release worthy.  Since you want to do the smoke test on regular basis, it makes sense to automate it.

It is always challenging to create a piece of a software system that fulfills the client needs, ready for use. Especially when it should be done in a very short amount of time, from an idea to a fully functional and tested piece of the application. Achieving the Definition of Done is hard but not impossible. Below are some of the tips that may help you in achieving the impossible.

Focus on your client, think: "Where the presence of bugs would hurt your client the most?", then let your answers drive your testing.

Keep the Bigger picture in mind: While testing needs to be meticulous and thorough, there is no point being fanatical about it. If you get bogged down by trying to achieve high coverage over one part of the system, you might end up not testing some other parts at all.

Increase communication with client to avoid misunderstandings: In the meeting, discuss all points whichever unclear or need some additional information. These communications will resolve the problem easily and quickly and will help to avoid any misunderstandings. Once you discuss these points, it should be communicated over email as well. Basically, simple rule is that don’t keep verbal communications.

Start writing early test cases: If you start writing test cases during early phase of Software Development Life Cycle then you will understand whether all requirement are testable or not. While writing test cases first consider Valid/Positive test cases which cover all expected behavior of application under test. After that you can consider invalid conditions/negative test cases.

Make a Test Plan: Start testing by first writing a Test Plan. It's a document describing the testing scope and activities. It is the basis for formally testing any software/product in a project.

Start with obvious and simple tests:

"Make everything as simple as possible, but not simpler" -Albert Einstein.

If any such case fails, developers will want to know it sooner rather than later. While you need to check invalid and unexpected input, check valid and expected input first. Make sure you do sufficient testing i.e. unit and integration testing before you release your code to the client. 
Note that debugging is not software testing.

Start testing with positive mindset: Start with a positive attitude and don’t think that there will not be a bug in the code. If you are testing application with intention of finding bug then you will definitely get bugs in the code.

Test broadly before you go deep: Check all parts of the program quickly before focusing. Start with core/primitive functions. You may have to fix those before you test the rest.

2 heads are better than 1:

Involve someone, may be a team mate to assist you with your testing. In this way there is a good chances that you may be able to get better results.

Happy Coding and Testing!

No comments:

Post a Comment