SElec-9 Testing (1)

SElec-9 Testing (1) - Ivan Marsic Rutgers University...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Ivan Marsic Rutgers University LECTURE 9: Software Testing 2 Topics Overview of Software Testing Test Coverage and Code Coverage Practical Aspects of Unit Testing Integration and System Testing 3 Overview of Software Testing Testing shows the presence, not the absence of bugs. Edsger W. Dijkstra A fault , a ls o c a lle d de fe c t o r b ug , is a n e rro ne o us ha rdwa re o r s o ftwa re e le m e nt o f a s ys te m tha t c a n c a us e the s ys te m to fa il Test-Driven Development (TDD) Every step in the development process must start with a plan of how to verify that the result meets a goal The developer should not create a software artifact ( a system requirement, a UML diagram, or source code ) unless they know how it will be tested A test case is a pa rtic ula r c ho ic e o f input da ta to b e us e d in te s ting a pro g ra m A test is a finite c o lle c tio n o f te s t c a s e s 4 Why Testing is Hard A key tradeoff of testing: testing as many potential cases as possible while keeping the economic costs limited Our goal is to find faults as cheaply and quickly as possible. Ideally, we would design a single right test case to expose each fault and run it In practice, we have to run many unsuccessful test cases that do not expose any faults 5 Logical Organization of Testing Unit test Unit test Unit test Integration test Component code Component code Component code T e s t e d c o m p o n e n t Integrated modules Function test Quality test Acceptance test Installation test System test System in use Ensure that each component works as specified Ensures that all components work together Verifies that functional requirements are satisfied Verifies non- functional requirements Customer verifies all requirements Testing in user environment ( Not necessarily how its actually done! ) 6 Acceptance Tests - Examples [ Recall Section 2.2: Requirements Engineering ] Test with the valid key of a current tenant on his/her apartment (pass) Test with the valid key of a current tenant on someone elses apartment (fail) Test with an invalid key on any apartment (fail) Test with the key of a removed tenant on his/her previous apartment (fail) Test with the valid key of a just-added tenant on his/ her apartment (pass) Input data Expected result 7 Test Coverage Test coverage measures the degree to which the...
View Full Document

Page1 / 21

SElec-9 Testing (1) - Ivan Marsic Rutgers University...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online