CIS 748 Software Management – Assignment #3
Javier Ramos Rodríguez
In the figure we can see a very formal but still valid testing process. It uses a traditional approach to test
the software having several stages and specific tasks on each stage; the problem is that this process can be
too costly. We can look at several aspects that will help us to make this process a little bit cheaper
improving the overall economics.
This approach probably will be really big in terms of writing code. In order to reduce this cost we need to
reduce the human generated code. To do this we should try to reuse test cases that are similar to each
other and use automated tools that help us to write the test cases. There are many tools available
nowadays that help the developer to write the test cases such JUnit or NUnit. These tools are focus on
unit testing and they do a lot of work for us. There are other tools available that can help us to test the
software and find additional bugs that can improve the testing process economics.
Also, in the application might be many methods or use case that are very similar to each other we have to
look that similarity and try to reuse some test cases to reduce effort and decrease the human generated
Talented developer will always increase the productivity but when taking about testing we have to be
very careful. A developer can be very good writing code but be awful testing it. The first thing we must
do is not let the developer test his/her own code and have someone else test the code. One approach, used
in eXtreme Programming is having the developers group in couples, one that writes the test cases first
and another that write the code specially focusing on passing the test cases; this approach uses a test-
driven process which is gaining a lot of recognition increasing the productivity considerably. The
developers start from a use case and first they write what test cases that use case should pass in order to
implement the desired functionality, after that they write the code. Writing the test cases before helps to
write better code with fewer bugs.
Also we need to get the customer involved, specially let him/her test the software because the customer
will be the final user and he/she will probably find the bugs easier.
There are many tools available that will support the testing process. We already talk about tools like
JUnit that help the developer to create test suites and the appropriate test cases. There are also
environments that help to use a test-driven approach making a lot easier to write test cases.
The idea is to get the right quality of the product. We want to focus on the driven requirement first and
test very carefully those requirements. We should try to focus from the beginning on testing the most
important features to try to find errors on early stages of development and don’t waste too much time in
functions that are not critical. We should also try to look for similarities and make priorities. Is very
common that if we focus first on solve the most difficult and risky tasks we will solve many problems
that are also present in the non-critical use cases, saving a lot of time and effort.
Taking a quick look at the process we can see that is a very heavyweight process. In case that the test is
invalid we need to rewrite the whole test case for a specific use case and that’s very costly. The problem,
is that the test a driven by use case that represent high level system functionalities that can be divide in
many atomic unit functions. So, one change that we can do is divide the test case for the use case is sub
test cases for each unit. So if one unit fails we just need to change one unit which is faster.
Also we would like to write the test cases before implementing the use cases. So, we have a main test
framework; we start writing the use cases that describe the main functionality of the system. Then, we set
a priority on the use cases that will set the testing order. Then, we write a general test suite for each use
case that will drive the implementation. The next step is to follow an iterative process and divide the use
cases is sub use cases as we gather more information. Then, we implement the use cases and create
several unit test cases for each use case. After that, we test the units, if a unit fails we check the error and
see if the unit test case is valid or not. If not, we rewrite the test case. The idea is to find the errors as soon
as possible saving time and money; and at the same time improving the quality. We write code with the
test case in mind, and we double check everything performing unit testing making sure that we achieve
the desire quality. We reduce cost, because we use automated tools and unit testing. Changing a unit test
case is not costly at all. By setting a priority we focus first on the driven requirements finding the most
common errors first making faster the rest of the implementation.
The process is show in the next figure:
B U IL D TES T
USE C A SES
C A SES
PR IO R ITY
C R EA TE SUB W R IT E
USE C A SES C O D E
USE C A SES
UNIT TEST C R EA TE UNIT S O U R C E
C A SES TEST C A SES C O D E
N O ( c h a n g e U n it T e s t)
U N IT TES T TES T
T E S T IN G P A S S ED ?
N O V A L ID ? YES F IX U N IT
W R ITE TEST TES T
R EPO R T R EP O R T
As we see in the figure this process tries to use a more iterative approach diving the tasks and making the
process easier to manage. We don’t have to change a whole test suite if just one method fails; this is the
advantage of unit testing. We use several layer of abstraction, the high level test case, the more specific
use cases and then for each use case we have many atomic units that are tested individually.
We cannot forget in this process about other kinds of test procedures. First, we need to perform
integration testing to check that the interfaces between different modules work as expected. We need to
test the application in the target environment to see if the application can run properly before deliver it to
the client. Virtualization tools are available to emulate different kinds of machine and operating systems.
Black box testing is necessary to test that the system replies as expected for all kinds of inputs.