9
a. Definition of software Testing b. Discuss the latest technique in the software testing –choose one latest testing technique and describe how to perform the technique, procedure/process, testing components etc. Software Testing is a process of finding errors while executing a program so that we get a zero defect software. It is aimed at evaluating the capability or usability of a program. Software testing is an important means of accessing quality of software. Though a lot of advancements have been done in formal methods and verification techniques, still we need software to be fully tested before it could be handled to the customer side. Thus there are a number of testing techniques and tools made to accomplish the task. Software testing is an important area of research and a lot of development has been made in this field. They are many latest techniques in the software testing as follow:- i. Test-driven development (TDD) The programming is guided by testing. Before coding, we should write the related test code at first, after that, program the test code, then test the develop code by testing program and the cycle continues, until the development is completed. The recent popular XP (Extreme Programming) mode strongly advocates this testing idea. ii. Iterative and incremental test. Page 1

Definition of Software Testing

Embed Size (px)

DESCRIPTION

shsf

Citation preview

Page 1: Definition of Software Testing

a. Definition of software Testing b. Discuss the latest technique in the software testing –choose one latest testing technique and

describe how to perform the technique, procedure/process, testing components etc.

Software Testing is a process of finding errors while executing a program so that we get

a zero defect software. It is aimed at evaluating the capability or usability of a program.

Software testing is an important means of accessing quality of software. Though a lot of

advancements have been done in formal methods and verification techniques, still we need

software to be fully tested before it could be handled to the customer side. Thus there are a

number of testing techniques and tools made to accomplish the task. Software testing is an

important area of research and a lot of development has been made in this field. They are many

latest techniques in the software testing as follow:-

i. Test-driven development (TDD)

The programming is guided by testing. Before coding, we should write the

related test code at first, after that, program the test code, then test the develop code

by testing program and the cycle continues, until the development is completed. The

recent popular XP (Extreme Programming) mode strongly advocates this testing idea.

ii. Iterative and incremental test.

It is evolved from the iterate model. After finishing the iteration, the system will

incrementally integrate some new functions until the completion of the entire system

function. It mainly focuses on the cumulative function in the regression test and each

iterative cycle test is completed by two parts: incremental test on the current iterative

product and the regression test on the completed function of former iterative cycle. This

is one of IBM favorite test methods.

iii. GUI automation test

GUIATF is an automated testing framework based on object-oriented capture

technology for GUI. About the method of testing case generation, Fu Bo, from Beijing

Page 1

Page 2: Definition of Software Testing

University of Aeronautics and Astronautics, and his mates put forward a kind of

automatic generation method of test data based on ant colony algorithm. By using bit

coding, a model from input domain of the software under test to ant paths of the ant

colony algorithm was established. This improved the diversity of ant paths and

decreased the degrees of the precocity and stagnation. Jiang Zhong wei, from Zhe Jiang

Sci-Tech University, applied the automatic generation idea of model-driven software

code in MDA to the automatic generation of model-driven software testing cases and

developed a framework which can automatically generate unit test case, thus improving

the automation degree of the software testing.

iv. Testability of component software

On the selection of the test case, Ma Liang li and his mates, from Hua Zhong

University of Science and Technology, applied a metadata selection method to select

testing case. It embedded the information and case to component in order to achieve

the generation of testing case, and used the method of UML to show the relevant use

case meta-model, testing case meta-model, the mapping between them, elements of

the component metadata. Ma Zhen and his mates, from Xi'an University of Technology,

proposed MTCGCBS, one of the GA, which introduced IGA and its advantages on the

generation of component software testing case. In the mean time, they also raised an

advanced method that is the “IIGA”, which brought the parallel, migration, self-adoption

and immune operator into traditional genetic algorithm, and also proofed its

convergence.

v. Embedded Software Simulation Test

Sheng Yong qing and his mates, from Tong Ji University, can test various embedded

software without significant modification by simulating the ARM embedded system on

PC. Yin Yong feng and his mates, from Beijing University of Aeronautics and

Astronautics, designed a testing development environment for MVC-based embedded

software, which not only ensure the successful development of ESTDE but improve the

repeatability and adaptability of the system.

Page 2

Page 3: Definition of Software Testing

Discussion

One of latest technique I have chosen from the above techniques is Test-driven development

(TDD). This technique has its own unique procedure/process and testing components.

Test-driven development (TDD) is an advanced technique of using automated unit tests to drive

the design of software and force decoupling of dependencies. The result of using this practice is a

comprehensive suite of unit tests that can be run at any time to provide feedback that the software is

still working. This technique is heavily emphasized by those using Agile development methodologies.

Creating and running automated tests inside.

The motto of test-driven development is “Red, Green and Re-factor.”

Red: Create a test and make it fail.

Green: Make the test pass by any means necessary.

Re-factor: Change the code to remove duplication in your project and to improve the design

while ensuring that all tests still pass

Figure 1: Test driven development process

The Red/Green/Refactor cycle is repeated very quickly for each new unit of code

Page 3

Page 4: Definition of Software Testing

Step One - Test

First of all, for each new feature or module a new test needs to be written. This test will

inevitably fail due to it being written before the module exists. For the test to be written, the

developers must understand what the requirements are for the feature set by extracting them

out of the User Story. The main difference with TDD compared to writing traditional unit tests is

that it encourages the developer to focus on the requirements before writing the code.

Step Two - Code

The next step is to write some code that will allow the test to pass. This new code will

not necessarily be perfect but will be sufficient to pass the initial test. The next step will take

care of tidying up the code and ensuring it meets quality expectations. It is most important to

understand that the code written at this point is only designed to pass the specified test; no

extra functionality should be included.

Step Three – Refactor

In this stage, the code written to pass the specified test is improved to meet quality

expectations, remove duplications and ensure it complies with departmental or corporate

standards—this is called refactoring. As the tests can be rerun at any time, confidence in the

code can be maintained by performing the specified test again to ensure that it still passes all

the criteria.

c. Discuss the pros and cons of the technique.

a) Pros of Test-Driven Development

It can lead to simple, elegant, modular code.

It can help developers find defects and bugs earlier than they otherwise would and

it’s a commonly held belief that a bug is cheaper to fix the earlier you find it.

The tests can serve as a kind of live documentation and make the code much easier

to understand.

It’s easier to maintain and refactor code, your own and other programmer’s code.

It can encourage developers to think from an end user point of view.

Page 4

Page 5: Definition of Software Testing

b) Cons of Test-Driven Development

It necessitates a lot of time and effort up front which can make development feel

slow to begin with.

Focusing on the simplest design now and not thinking ahead can mean major

refactoring requirements.

It’s difficult to write good tests that cover the essentials and avoid the superfluous.

It takes time and effort to maintain the test suite and it must be reconfigured for

maximum value.

If the design is changing rapidly then you’ll need to keep changing your tests. You

could end up wasting a lot of time writing tests for features that are quickly

dropped.

Conclusion

Testing has been widely used as a way to help engineers develop high-quality systems,

and the techniques for testing have evolved from ad hoc activities means of small group of

programmers to an organized discipline in software engineering. However, the maturation

of testing techniques has been fruitful, but not adequate. In this era of new and higher

demand of software testing, it is important to constantly summarize new achievements,

fresh hotspots and propose different ideas in order to promote the study on software

testing system engineering, to facilitate the rapid development on software testing field and

industry.

Page 5

Page 6: Definition of Software Testing

References

Alessandro Orso, G. R. (2014, june 7). Software Testing: A Research Travelogue (2000–2014).

Retrieved march 6, 2015, from ACM: http://delivery.acm.org/10.1145/2600000/2593885/p117-

orso.pdf?ip=103.5.183.47&id=2593885&acc=ACTIVE%20SERVICE&key=69AF3716A20387ED

%2EF0EE3E682E94A1DD

%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35&CFID=632924554&CFTOKEN=62177366&__ac

m__=1425621895_c7e37fc532a6e009

H, Z. (2013). Research on New Techniques and Development Trend of Software Testing.

Retrieved March 6, 2015, from http://www.atlantis-press.com/php/download_paper.php?

id=5225

James A. Whittaker. (n.d.). Ieeexplore. Retrieved march 6, 2015, from What Is Software Testing?

And why it is so hard?: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=819971

Madhurima, S. D. (2014, AUGUST). Software Testing: An Insight of Latest Tools. Retrieved 3 6,

2015, from CSI communication: http://www.csi-india.org/c/document_library/get_file?

uuid=25e6d339-8a08-4273-969c-519ef3d45f01&groupId=10157

Mr.Gautam M Lodha, M. S. (2014, november 29). Search based software testing with genetic

using fitness function. Retrieved marc 6, 2015, from ieeexplore:

http://ieeexplore.ieee.org/ielx7/7005043/7018206/07019065.pdf?

tp=&arnumber=7019065&isnumber=7018206

Page 6