The program reads weather data from a file, calculates various statistics and writes them to a summary.txt file. It also generates a diary.txt file by writing the day number, wind speed and direction, cloud cover, rainfall, and pressure for each day entry in the weather readings.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Task Using the attached Requirements Specification and Program Design for a software application (Weather Record Program), devise and execute appropriate system tests for the application, and report on the outcome of your tests. Explain why you have selected the test case derivation technique(s) that you used to derive your system tests. Critically review your approach to testing this application. The application will be available for testing immediately after the deadline for submitting Part A. Deliverables Part A (Test Plan) Statement of which test case generation technique(s) were used, with your justification for their selection. (800 words maximum excluding references. State the word count at the end of the statement.) List of test cases for the application, showing which test case generation technique was used to obtain each test case. Part B (Test Report) Actual test data for each test. Expected outcome for each test. Actual outcome of each test. Records of any defects in the software application identified during testing. Critical review of your approach to testing the application. (400 words maximum, excluding references. State the word count at the end of the review.) Note: Although every effort has been made to ensure the quality of the attached requirements and detailed design for the Weather Record Program, there isnoguarantee that these are error-free! Marking Scheme Part A Justification for selection of test case generation technique(s).Logical selection of appropriate test case generation technique(s), with good justification for choice.(20 marks) Test cases.Clear, comprehensive set of test cases, minimising duplication of tests; sufficiently clear for test data to be derived easily and for tests to be set up by another tester. Effective use is made of the chosen test case generation technique(s).(30 marks) Part B Records of testing.Test data and outcomes clearly linked to test cases. Appropriate choice of test data. Tests can be repeated easily where appropriate.(15 marks) Defect recording. Effectiveness of actual tests in detecting defects. Effective reporting of any defects detected. (25 marks) Critique of your approach to testing.Awareness of the strengths and weaknesses of the way you tackled both parts of this assignment.(10 marks) Template Version 1
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
To achieve a First Class Mark: Part A.The Test Cases are fully appropriate to the application and are highly likely to reveal faults in the software application. Test coverage is demonstrably high. Almost every Test Case is clearly specified and its purpose is clear. There are no unnecessary duplicate tests. The selection of test case generation techniques is well justified, with reference to supporting evidence. Each Test Case has clearly been derived from a chosen test case generation technique. Part B.Almost all the defects in the software application have been detected, with no false positives reported. Each defect is reported clearly. Test Records are comprehensive, and there is clear traceability between Test Cases, Test Records and Defect Reports. Tests can easily be repeated. Test data are appropriate to each Test Case. Insight is shown when critically reviewing the approach to testing, drawing on definitive sources where appropriate. Weather Record Program REQUIREMENTS SPECIFICATION The input data, from a weather monitoring station, is to be read from a fileweather.txtin the local directory. The file format is specified below. You can assume that allweather.txtfiles have already been validated and that the program will never be run withweather.txtfiles that do not conform to the format specified below. The program is required to: a) Calculate summary data and write this to asummary.txtfile. Thesummary.txtfile format is specified below. b) Translate the daily weather data into diary format, and write this to adiary.txtfile. Thediary.txt file format is specified below. If theweather.txtfile cannot be opened, then the program is required to terminate with an appropriate error message. FILE FORMATS These are specified in extended BNF notation. weather.txt weather readings ::= header line, newline,0{day readings}20; header line ::= day number of first reading, space, pressure on previous day; day number of first reading ::= "1" | "2" | .. | "366";; ::= (* Day number, within this year, of the first set of day readings *); pressure on previous day ::= pressure; day readings Template Version 1
::= max temp, min temp, space, pressure, space, cloud cover, rainfall, space, wind direction, wind speed, newline; max temp ::= temp; ::= (*Maximum temperature during the day *); min temp ::= temp; ::= (*Minimum temperature during the day *); temp::= digit, digit; ::= (* Temperature values are in degrees celsius. If the temperature is below zero, 50 is added to the absolute value of the temperature: for example, -8 is recorded as 58. *); pressure ::= digit, digit, digit; ::= (* Atmospheric pressure to nearest tenth of a millibar (mb), omitting the hundreds.The actual pressure is derived from the following algorithm. Let the pressure digits beabc. Ifabc>550 then actual pressure is9ab.celse actual pressure is10ab.c. Atmospheric pressure over the UK is normally in the range 960 mb to 1050 mb, so a value of 119 implies an actual pressure of 1011.9mb and a value of 916 implies 991.6mb *); cloud cover ::= digit; ::= (* Measured in "oktas" - eights of sky covered. Values are in range 0-9, where for example 0 means cloudless sky, 3 means cloud cover over 3/8 of sky, 8 means total cloud cover, 9 means unable to determine cloud cover, usually due to dense fog *); rainfall ::= digit, digit; ::= (* Total rainfall that day, in millimeters *); wind direction ::= "00" | "01" | "02" | .. | "35"; ::= (* The direction that the wind is comingfrom, measured in units of 10 degrees clockwise from North. So a wind direction of 09 means 90 degrees clockwise from North. *); wind speed ::= digit, digit; ::= (* Wind speed in miles per hour. *); digit::= "0" | "1" | .. | "9"; space::= ""; newline ::= (* Line terminator in file *); summary.txt summary data ::= no readings line | (header line, newline, temperature lines, newline, rainfall lines, newline, wind line, newline); no readings line ::= “Noreadings in file”, newline; header line ::= "Summary data for days", first day, "to", last day, newline; first day ::= day number; Template Version 1
::= (* Day number of first reading in the set *); last day ::= day number; ::= (* Day number of last reading in the set *); day number ::= "1" | "2" | .. | "386"; ::= (* Day number relative to the start of the year of the first reading *); temperature lines ::= max mean line, newline, min mean line, newline; max mean line ::= "Meanmaximum temperature:", mean temp; min mean line ::= "Meanminimum temperature:", mean temp; mean temp ::= temp, ".", digit, digit; ::= (* Mean temperature over the period in degrees celsius. *); temp::= [-], [digit], digit; ::= (* Temperature in degrees celsius, shown as negative if below zero. *); rainfall lines ::= total rainfall line, newline, [wettest day line], newline, dry days line; total rainfall line ::= "Total rainfall (mm):", rain; rain::=1{digits}3; ::= (* The total amount of rain this period in millimeters *); wettest day line ::= "Wettest day:", day rain, "mm on", top day; ::= (* This line is omitted if no rain fell during this period. *); day rain ::=1{digits}2; ::= (* The amount of rain that day in millimeters *); top day ::= day number | (day number, "&", day number) | "Several days" ; ::= (* Day number of wettest day. If two days are equally wet, both day numbers are given. If more than two days are equally wet, then "Several days". *); day number ::= "1" | "2" | .. | "396"; ::= (* Day number relative to the start of the year of the first reading *); dry days line ::= "Number of dry days:", number of days; ::= (* Number of days when the rainfall was zero. *); wind line ::= "Number of calm days:", number of days; ::= (* Number of days when the wind speed was zero. *); number of days ::= ["1" | "2" | "3"], digit; digit::= "0" | "1" | .. | "9"; space::= ""; newline ::= (* Line terminator in file *); Template Version 1
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
diary.txt diary:=0{day entry}20 day entry ::= day number, space, wind speed, space, [wind direction, space], cloud, space, rain, space, "Pressure", space, pressure change, newline; day number ::= "1" | "2" | .. | "386"; ::= (* Day number relative to the start of the year of the first reading *); wind speed ::= "Calm" | "Light" | "Moderate" | "Fresh" | "Strong" |"Gale" | "Severe Gale" ; ::= (* Derived from theWindSpeedtable below. *); wind direction ::= "N" | "NE" | "E" | "SE" | "S" | "SW" | "W" | "NW" ; ::= (* The direction that the wind is coming from, whereNis North andSEis South East, etc.. This is calculated from the wind direction in degrees, where 0 is North (as are 10, 20, 340 and 350), 30, 40, 50 and 60 are North-East, 70, 80, 90, 100 and 110 are East, etc.. Wind direction is omitted if the wind speed is calm. *); cloud::= ( "sunny" [, "intvls."] ) | "overcast" | "foggy" ; ::= (*sunnyif cloud cover is 0-2 oktas,sunny intvls.if cloud cover is 3-5 oktas,overcastif cloud cover is 6-8 oktas,foggyif cloud cover is 9 oktas. *); rain::= "Fair" | "Rain" ; ::= (*Fairif no rain fell that day, otherwiseRain*); pressure change ::= "Rising" | "Falling" | "Steady"; ::= (*Rising(orFalling) if the pressure this day is greater (or less) than the pressure the previous day, orSteadyif the pressure is unchanged from the previous day. *); space::= ""; newline ::= (* Line terminator in file *); WindSpeedis derived from the table Wind Speed in miles per hourWindSpeed 0Calm 1-12Light 13-18Moderate 19-24Fresh 25-38Strong 39-46Gale >46Severe Gale Template Version 1
Weather Record Program PROGRAM DESIGN – pseudocode in Structured English (With line numbers) 001***Design of weather readings. 002***Thiswill include: 003***Number of the firstday relative to start of year; 004***Pressure on the previous day; 005***Number of day entries; 006***For each day: 007***max_temp, min_temp, pressure, 008***(after conversionin each case) 009***cloud_cover, rainfall, 010***wind_direction, wind_speed. 020BEGIN 021***Read weather file 022setnumber_of_records tozero 023clearerror_flag 024trytoopen weather.txt file 025IFcannot open weather.txt file 026THEN 027DISPLAY error message 028seterror flag 029ELSE 030READfirst_day_number from weather.txt file 031READprevious_pressurefrom weather.txt file 032convert previous_pressure to millibars 033setday_number to first_day_number 034LOOPfor each day-worth of weather readings in the weather.txt file,up to 20 days 035READ max_temp for this day 036convert max_temp to degrees celsius 037READ min_temp for this day 038convert min_temp to degrees celsius 039READ pressure for this day 040convert pressure to millibars 041READ cloud_cover forthis day 042READ rainfall for this day 043READ wind_direction for this day 044READ wind_speed for this day 045increment number_of_records by 1 046increment day_numberby 1 047ENDLOOP when all weather readings read 048close weather.txt file 049***write summary: 050setsum_of_max_temps to zero 051setsum_of_min_temps to zero 052settotal_rainfall to zero Template Version 1
053setnumber_dry_days tozero 054setnumber_calm_days to zero 055setday_records_read to zero 056tryto open summary.txt file 057IFsummary.txt file cannot be opened 058THEN 059DISPLAY error message 060ELSE 061day_number = number_of_first_day 062LOOP for each day entry in weather readings 063add max_temp to sum_of_max_temps 064add min_temp to sum_of_min_temps 065add rainfall to total_rainfall 066IF rainfall = 0 067THEN 068increment number_dry_days by 1 069ENDIF 070IF wind_speed = 0 071THEN 072increment number_calm_days by 1 073ENDIF 074IF first day record 075THEN 076set highest_rainfall to rainfall 077set wettest_day to day_number 078set number_wettest_days to 1 078ELSE 080IF rainfall > highest_rainfall 081THEN 082set highest_rainfall to rainfall 083set wettest_day to day_number 084set number_wettest_days to 1 085ELSE 086IF rainfall = highest_rainfall 087THEN 088increment number_wettest_days by 1 089set other_wettest_day to day_number 090ENDIF 091ENDIF 092ENDIF 093increment day_records_read by 1 094increment day_number by 1 095ENDLOOP 096*** Write summary file 097***so all WRITES are to summary.txt file 098IFday_records_read = 0 099THEN 100WRITE “No readingsin file” 101ELSE 102WRITE header line 103WRITE mean max temp line 104WRITE mean min temp line 105WRITE total rainfall line 106IF number_wettest_days > 0 Template Version 1
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.