Developing a test plan and debugging
This presentation is the property of its rightful owner.
Sponsored Links
1 / 17

Developing a Test Plan and Debugging PowerPoint PPT Presentation


  • 46 Views
  • Uploaded on
  • Presentation posted in: General

Developing a Test Plan and Debugging. MIS3502: Application Integration and Evaluation Paul Weinberg [email protected] Presentation by David Schuff. The role of testing. What should happen…. Development. Testing. Rollout. What often does happen…. Development. Rollout. Chaos.

Download Presentation

Developing a Test Plan and Debugging

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Developing a test plan and debugging

Developing a Test Plan and Debugging

MIS3502: Application Integration and Evaluation

Paul Weinberg

[email protected]

Presentation by David Schuff


The role of testing

The role of testing

What should happen…

Development

Testing

Rollout

What often does happen…

Development

Rollout

Chaos


Types of testing

Types of testing

  • Unit Test

    • Does each piece work individually?

  • System Test (Integration Test)

    • Do all the pieces work together?

  • Acceptance Test

    • What do the users think of it?

  • We’ll focus on the system test


Constructing a system test

Constructing a system test

  • Go back to the use cases

    • Deposit transaction use case

    • Balance inquiry transaction use case

    • Invalid PIN extension use case

  • Create scenarios for each use case

    • Test scripts

  • “Play out” those scenarios

  • Verify that each one is successful


Try it

Try it…

  • For example, to test the deposit transaction

    • Enter “checking” for account type, $500 for amount

    • Verify it works

    • Is this enough to test the deposit transaction?

  • How would you test the withdrawal use case?


Building a complete test plan

Building a complete test plan

  • This obviously isn’t a complete test plan

  • But how many scenarios should you test

    • Where do you stop?


Test plans in this course

Test plans in this course

  • Two goals

    • “Deliverable mentality”

      • Get major functions working completely, one at a time

      • Instead of having everything “half-working”

      • The application must compile or you can’t test anything!

    • Practice constructing and executing test plans

  • Start with the grading guidelines

    • The major functions the application should perform

  • Construct scenarios for each function

  • Try out each scenario

  • Create a chart like the one earlier in this presentation


Create your own test plan

Create your own test plan

  • Create a test plan for the Movie application

  • Think about the use cases

  • How would you test each one?


Debugging

Debugging

What a lame, obvious visual pun!

  • Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected. (http://en.wikipedia.org/wiki/Debugging)

  • A debugger is a tool to help you do this, but you can manually debug a program


Types of errors

Types of errors

  • Compile-time

    • Syntax errors in the application which prevent it from compiling

  • Runtime

    • Logic errors in the application which cause the application to unintentionally terminate while running


The visual studio debugger stupidcalc example

The Visual Studio Debugger:StupidCalc example

namespace StupidCalculator

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void button1_Click(object sender, EventArgs e)

{

double num1 = Convert.ToDouble(textBox1.Text);

double num2 = Convert.ToDouble(textBox2.Text);

double ans = num1 * num2;

textBox3.Text = ans.ToString();

}

}


Compile time error example

Compile-time error example

  • Changedouble num1 = Convert.ToDouble(textBox1.Text);todouble num1 = Cnvt.ToDouble(textBox1.Text);

  • And you’ll get this error when you compile it:


Runtime error example

Runtime error example

When you enter these values…

…you get this error


With the vs 2008 debugger

With the VS 2008 debugger

Now when you enter these values…

…you get this…


The visual studio 2008 debugger

The Visual Studio 2008 debugger

  • Helps you troubleshoot during runtime

  • Indicate exactly where an error has occurred

  • Shows you what values the program variables hold at the time of the error


Using breakpoints

Using breakpoints

  • Allows you to troubleshoot your program before an exception occurs

    • View the state of the program at a point in its execution

Click here to set a breakpoint.

The program will pause before this line executes.

We put the breakpoint here because this is the line that generated the exception.


When you reach the breakpoint

When you reach the breakpoint…

  • The program pauses its execution before the line executes and enters the debugger

    • It hasn’t thrown the exception yet

    • But you can seesomething bad isabout to happen!


  • Login