lecture 14

27
Database Design Concepts Info 1408 Lecture 14 Term 2 week 3 Testing

Upload: softwarecentral

Post on 14-Nov-2014

308 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Lecture 14

Database Design ConceptsInfo 1408

Lecture 14 Term 2 week 3

Testing

Page 2: Lecture 14

Objectives Why software has errors Common software development

problems Software testing Testing vs debugging Types of software testing

Page 3: Lecture 14

“A program which does not work is undoubtedly wrong, but a program which does work is not necessarily right”

Michael Jackson

Page 4: Lecture 14

Software Quality Control

Quality software is reasonably bug-free, delivered on time and within budget, meets requirements and is maintainable.

Page 5: Lecture 14

Why does software have errors?

Miscommunication or no communication The specifics of what an application

should or shouldn't do (the application's requirements).

Programming errors Programmers, like anyone else, can

make mistakes.

Page 6: Lecture 14

Why does software have errors?

Software complexity Windows-type interfaces Client-server and distributed applications Enormous relational databases Sheer size of applications Object-oriented programs

Page 7: Lecture 14

Why does software have errors?

Changing requirements Time pressures

Scheduling of software projects is difficult at best, often requiring a lot of guesswork. When deadlines loom and the crunch comes, mistakes will be made

Page 8: Lecture 14

Why does software have errors?

Egos People prefer to say things like:

’No problem' ’Piece of cake' ’We can do that’

Contract Hunting ’Just win the contract, we’ll sort the rest

out after'

Page 9: Lecture 14

Why does software have errors?

Poorly documented code It's difficult to maintain and modify code that

is badly written or poorly documented In many organisations management provides

no incentive for programmers to document their code or write clear, understandable code

Poor documentation Seen by many programmers as an

unnecessary evil

Page 10: Lecture 14

Why does software have errors?

Software development tools Visual tools Class libraries Compilers Scripting tools, etc.

Often introduce their own errors or are poorly documented, resulting in added errors

Page 11: Lecture 14

Testing Vs Debugging

Testing & debugging are distinct processes Testing - confirming the presence of

errors Debugging - locating and repairing

these errors

Page 12: Lecture 14

The Debugging Process

Re-test ProgramLocate Error

Design Error Repair Repair Error

Page 13: Lecture 14

Types of Testing (there are more)

Unit TestingIntegrationSystem Tests the whole

system

PerformanceAcceptance testing

Page 14: Lecture 14

The Testing Process

Unit Testing

Module Testing

Sub-System Testing

System Testing

Acceptance Testing

Unit/Component Testing

Integration Testing

User Testing

Page 15: Lecture 14

Unit Testing

The testing of individual modules of code eg an SQL statement, procedure or subroutine

This will check Calculations are correct, validations are working correctly, the correct output is produced.

Page 16: Lecture 14

Test Software Components

Software Verification: Evaluation of:

Documents Code

Software Validation: Involves the actual software testing Takes place after verification Includes all requirements & specifications

Do the programs do what they are supposed to do?

Page 17: Lecture 14

Integration testing

Checks that modules work together Interface compatability ( modules can

work together) Parameter values- correct values are

passed as parameter between modules

Run time exceptions

Page 18: Lecture 14

Performance Testing

Tests the whole system in the working environment Can the system deal with the amount

of transactions- Throughput Can the system respond to the user

requests in the required time- response time

If it crashes is recovery time acceptable?

Page 19: Lecture 14

Performance testing (2)

Some systems designed to handle a specified load Number of users or transactions per second

Tests are designed to ensure the system can process its intended load Usually a series of tests where the load is

gradually increased Continues beyond maximum design load or

until system fails

Page 20: Lecture 14

Performance testing (3)

It is often necessary for specific test software to be written to simulate the specified loads

Page 21: Lecture 14

Robustness

A program is said to crash when it terminates unexpectedly.

A robust program is one that doesn't crash even if it receives unexpected input values.

Generally, whenever a value is received to be processed, it should be checked before processing continues, if an unexpected value could cause the program to crash.

Page 22: Lecture 14

Acceptance testing

Carried out by end usersIs the system acceptable to the users Interface acceptable Performance ok

Formal testingIf everything is OK the user will ‘Sign off’- i.e. project is complete

Page 23: Lecture 14

Usability

The usability of a program refers to the ease with which users of your application can interact with your program.

A user-manual can help make your programs easier to follow.

Page 24: Lecture 14

Another point to consider is when to check and print out error messages, it should be done at an appropriate point in the process to minimise user annoyance.

Similarly the number of operations that a user is required to do to carry out an operation should be carefully considered.

Page 25: Lecture 14

Test Planning

Concerned with setting out standards for the testing process, describing the test and the expected result.Test Plan Test number Date Purpose/type of test Expected outputs for stated inputs

More about this next week

Page 26: Lecture 14

Summary

We have considered the reasons why a system needs to be tested.Explained the difference between testing and debugging.Covered the main categories of tests

Page 27: Lecture 14

References

Satzinger, Burd and JacksonChapter 15 pages 621-628