BarGraph Test Suite

Applet Name: BarGraph

Purpose:

Allows the user to graphically display data frequency using a bargraph. The user can graph a set of data (pre-given data, or the user's own data) and manipulate the y-axis values.

Description:

The applet allows the user to graph a set of data, change the minimum and maximum y-axis values, decide the width of the different bars, and decide the color of the bars.

Data Specification:

The Max value for the y-axis is 1.0E308, and there cannot be more than 1.0E308 numbers.
The Min value for the y-axis is -1.0E308, and there cannot be more than 1.0E308 numbers.

Platforms/Browsers:

Test Cases:

Test Case Title Description
Test1_Bar Graph: Applets Layout Verify that the applet's layout is correct and
formatted properly (i.e. no cutoff buttons or text)
Test2_Bar Graph: What, How and Why pages Verify the what, how and why pages come up correctly.
Ensure that any functionality or usage changes are
reflected in the text of the what, how and why pages if necessary.
Note: This is not valid on totest site
Test3_Bar Graph: Initial Values Input:
  1. Verify that the initial values below are present when the applet is first started.
    • Minimum Value on Bar Graph = 0.0
    • Maximum Value on Bar Graph = 16.0
    • Bar Color = Blue
    • "Choose a data set" is at How I divide my 24 hour day
    • Under the Graph Data button, the Data in the box is:
      7,school; 2,eat; 2,play outside; 3,watch tv; 8,sleep; 1,chores; 1, homework
    • Bar Graph is displayed correctly for given data
Test4_Bar Graph: Bar Width Using Arrows Input:
  1. Click on/and or hold down the left arrow of the Bar Width scroll bar
Output:
  • Verify that the bar on the scroll bar moved to the left.
  • Verify that the width of all of the bars on the graph decreased.
Test5_Bar Graph: Bar Width Using Scroll Bar Input:
  1. Click and drag the bar for the Bar Width to the left.
Output:
  • Verify that the bar on the scroll bar moved to the left.
  • Verify that the width of all of the bars on the graph decreased.
Test6_Bar Graph: Y-Axis Top of Scroll Bar Input:
  1. Click and drag the bar for the Y-Axis upwards untill it hits the top of the scroll bar.
Output:
  • Verify that the Minimum value for the bar graph = 0.0
  • Verify that the Maximum value for the bar graph = 8.0
  • Verify that the height of the bars in the graph increased in proportion to the new Min and Max values.
Test7_Bar Graph: Y-Axis Bottom of Scroll Bar Input:
  1. Click and drag the bar for the Y-Axis downwards untill it hits the bottom of the scroll bar.
Output:
  • Verify that the Minimum value for the bar graph = 0.0
  • Verify that the Maximum value for the bar graph = 160.0
  • Verify that the height of the bars in the graph decreased in proportion to the new Min and Max values.
Test8_Bar Graph: Decreasing Maximum with Arrows Input:
  1. Click on/and or hold down the up arrow for the Y-Axis.
Output:
  • Verify that the Minimum value for the bar graph = 0.0
  • Verify that the Maximum value for the bar graph decreased.
  • Verify that the height of the bars in the graph decreased in proportion to the new Min and Max values.
Test9_Bar Graph: Increasing Maximum with Arrows Input:
  1. Click on/and or hold down the up arrow for the Y-Axis.
Output:
  • Verify that the Minimum value for the bar graph = 0.0
  • Verify that the Maximum value for the bar graph increased.
  • Verify that the height of the bars in the graph increased in proportion to the new Min and Max values.
Test10_Bar Graph: Minimum and Maximum Box Input:
  1. Input 5.0 for the Minimum Value box.
  2. Input 15.0 for the Maximum Value box.
  3. Click the Set Min and Max button.
Output:
  • Verify that the Minimum value for the bar graph = 5.0
  • Verify that the Maximum value for the bar graph = 15.0
  • Verify that the height of the bars in the graph have changed in proportion to the new Min and Max values.
Test11_Bar Graph: Color Input:
  1. Verify that the current bar color is blue.
  2. Click on the Bar Color Button.
  3. Verify that there are seven color choices.
  4. Click on a color other than blue.
Output:
  • Make sure that the bar color changed to the color that you choose.
  • Verify that nothing else changed.
Test12_Bar Graph: Clear Data Input:
  1. Click on the the Clear Data button.
Output:
  • Verify that the graph is completely white.
  • Verify that the Min and Max values boxes = 0.0
  • Verify that the text in the Data Box has been deleted and replaced with the text (Enter Text Here).
Test13_Bar Graph: Graph Data Input:
  1. Click the Clear Data button.
  2. Assuming the Clear Data button works:
  3. Type the following (without the quotation marks!)
  4. On the first line type "10, Sleep"
  5. On the second line type "2, Eat"
  6. On the third line type "6, Work at Shodor"
  7. On the fourth line type "1, Pretend to work at Shodor while really talking to friends"
  8. On the fifth line type "2, Watch T.V."
  9. On the sixth line type "2, Play sports"
  10. On the seventh line type "1, Chores"
  11. Click the Graph Data button.
Output:
  • Verify that a graph is displayed
  • Verfiy that the graph is labled correctly ie. the first bar (from the left) is labled Sleep, the second bar is labled Eat etc.
  • Verify that the each bar has the correct value corresponding to the text in the Data Box.
  • Verify that the graph values add up to 24 (Data set is for a 24 hour day).
  • Verify that the bar color is blue.
  • Verify that the Min bar value = 0.0
  • Verify that the Max bar value = 20.0
Test14_Bar Graph: Data Sets Input:
  1. Click on the Choose a data set button.
  2. Choose a data set other than How I divide my 24 hour day.
Output:
  • Verify that the data in the data box has changed to suit the new data set.
  • Verify that a new graph correctly representing the chosen data is displayed.
  • Verify that the bar color is still blue.
  • Verify that each bar fits entirely in the graph (none of the bars extends beyond the size of the graph).