Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a test plan document for the program below. Example document below program. ----------------------------------------------------------------------------------- Follow the format given in the example test plans (one below,

Create a test plan document for the program below.

Example document below program.

-----------------------------------------------------------------------------------

  • Follow the format given in the example test plans (one below, and one on the Testing page). You can download and copy the test plan document below and use it as a template: replace the content of each section with your own content.
  • Write the test plan as if for someone who cannot see your source code (utilize black-box testing). They can only run the program, provide inputs, and observe outputs.
  • For each test case, include at least the following fields: Summary, Test Procedure, Test Data, Expected Result. Feel free to add more fields if you want to. (See Test Case for additional fields.)
  • Include test cases for all important categories of input (valid, invalid, boundary, etc.). If your program passes every test case in your test plan, you should be confident that it functions correctly.
    • Be sure to run your program against the test plan to determine its correctness, and fix any bugs found.

---------------------------------------------------------------------------------

My program:

#Fitness Tracker

def getUserTime(type): exercised = input("Did you do " + type + "? (yes/no): ") if exercised.lower() == "no": return 0 else: time = float(input("Enter how long you did " + type + "? (mins): ")) return time def main() duration = [0, 0, 0] types = ["yoga", "cardio", "meditation"] days = ["Monday", "Tuesday", "Wedneday", "Thursday", "Friday", "Saturday", "Sunday"] print("Welcome to your Fitness Tracker!") for days in range (1, 8, 1): print("Day -". days[day-1]) for type in types: time = getUserTime(type) if type == "yoga": duration[0] += time elif type == "cardio": duration[1] += time else: duration[2] += time if sum(duration) >= 3 * 20 * 7: print("Your fitness score is a full 5 stars! Nice work!") elif sum(duration) >= 3 * 20 * 7 * 0.8: print("Your fitness score is 4 out of 5 stars") elif sum(duration) >= 3 * 20 * 7 * 0.6: print("Your fitness score is a 3 out of 5 stars") elif sum(duration) >= 3 * 20 * 7 * 0.4: print("Your fitness score is a 2 out of 5 stars") else: print("Your fitness score is a 1 out of 5 stars. Do better next week.")

___________________________________________________________

TEST PLAN EXAMPLE:

Program Description

Calculates terms in the Fibonacci sequence as well as the Golden Ratio.

Input

  • n: the number of Fibonacci terms to calculate

Output

  • counter: ordinal position of the Fibonacci term
  • first: prior Fibonacci term
  • second: prior Fibonacci term
  • next: first + second, the current Fibonacci term
  • golden: the golden ratio approximated by the last 2 Fibonacci terms calculated

Test Plan Overview

System tests using black-box testing of all functions of the program. Valid as well as invalid inputs are tested.

Test Cases

Test Case 1: Invalid Inputs

Summary

Verify that invalid inputs produce an error message

Test Procedure

When prompted for the number of Fibonacci numbers, enter the input

Test Data

asdf

4.0

Expected Result

Message indicating that a whole number must be entered.

Ability to re-enter the input.

Test Case 2: Valid Inputs Producing No Output

Summary

Verify that input of the value 0 or less does not produce any output

Test Procedure

When prompted for the number of Fibonacci numbers, enter the input

Test Data

0

-3

Expected Result

No output. Program ends normally.

Test Case 3: First 2 Terms

Summary

Verify that input of 1 or 2 produces 1 or 2 Fibonacci terms respectively, and no golden ratio

Test Procedure

When prompted for the number of Fibonacci numbers, enter the input

Test Data

1

2

Expected Result

Output of the first 1 or 2 Fibonacci terms and their ordinal position. The first 2 terms are both 1. Each term should be on a separate line. For example:

Fibonacci number 1 is 1

Fibonacci number 2 is 1

Test Case 3: Multiple Terms

Summary

Verify that input greater than 2 produces the requested number of Fibonacci terms, as well as the golden ratio

Test Procedure

When prompted for the number of Fibonacci numbers, enter the input

Test Data

3

20

Expected Result

Output of the requested number of Fibonacci terms and their ordinal position, with each term on a separate line. For terms 3 and greater, the addition showing the calculation of the term is also output, as well as the golden ratio as calculated so far (and identified as such with a label). For example, the first few terms output should be:

Fibonacci number 1 is 1

Fibonacci number 2 is 1

Fibonacci number 3 is 1 + 1 = 2

Approximate Golden Ratio: 2.0

Fibonacci number 4 is 1 + 2 = 3

Approximate Golden Ratio: 1.5

Fibonacci number 5 is 2 + 3 = 5

Approximate Golden Ratio: 1.6666666666666667

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

7 What is the role of information in a capital market?

Answered: 1 week ago

Question

2. Confront self-defeating, failure-avoiding strategies directly.

Answered: 1 week ago