Professional Documents
Culture Documents
Testing Log Example
Testing Log Example
Plan and carry out the testing of code in table given below
For loop To make sure that It msgboxed 3 times Test succeeded For Loop thanks_for_playing = ["Thanks for
everything works thanks for playing which playing", "Thanks for playing",
was intended so the test "Thanks for playing"]
was successful for x in thanks_for_playing:
easygui.msgbox(x)
IfQuiz
statement To test that the All of my if statement Test if Continue == "A. 1769":
Testsuccessful
was good and Valid and invalid
question is printed questions worked If statement easygui.msgbox("you are
question went as intended
correctly and make superbly and if they got it incorrect\nthe correct answer
incorrect was:\nB. 1642")
sure that if the user right it told them so and if
gets it right or wrong they got it wrong they elif Continue == "B. 1642":
easygui.msgbox("you are
then they will be would be told so and
correct")
properly allocated to what the right answer Score = Score+10
the code that makes was. Invalid answer else:
sense. If you get the easygui.msgbox("you are
answer incorrect the incorrect\nthe correct answer
score was not added was:\nB. 1642")
and the correct
answer was displayed
input If the age was 14 or The code worked as it was test worked as Valid and invalid age = easygui.integerbox("How old
over the user was supposed to it made me intrended are you?", "age")
allowed into the exit if I was under 14 and if age < 14:
game but if it was exit(easygui.msgbox("Sorry you
1|Page
Student Name
under it would make over was allowed in and are not old enough to play this
them exit continued to next gui quiz", "Not Correct Age"))
else:
easygui.msgbox("You are the right
age please continue")
While loop If the answer that the It worked because when I valid bonus = "nine"
user is valid it lets tested the correct answer guess = easygui.enterbox("How many
them continue it let me contiunue sheep are their for each person in
New Zealand!"
" \n(type
number in letters no capitals) \n")
guesses = 1
While loop If the user inputs the It did work but I did I simply had to invalid while guess != bonus:
wrong answer the notice that the question change the second easygui.msgbox("No that wasn't
code will keep was not the right/same enter box question it")
replaying itself until question as it was the first the same as the first. guess = easygui.enterbox("How
they get it right time if the user got it many sheep are there for each person
in New Zealand! \n")
wrong the first time the
guesses += 1
rest would be pringted easygui.msgbox("Well done you got
differently but I managed it!")
to find the problem and easygui.msgbox("It took {}
fix it. guesses".format(guesses))
2|Page