Comp426526 - 16a assignment using junit write a set of unit


Part One:

1. Using JUnit write a set of unit tests for the sample application you created for assignment one. If you have a large amount of functionality you may limit your tests to 30. In your report you do not need to include the full code from your test class, but for each test you should write the name of the function you are testing, the name of the test, a short description of what the function does, any setup required prior to the test running, the assertion used in your test and a comment on the purpose of the test. For example, for one of the tests for my SimpleMed application I might write:

Function               calcInfusionRate()

                           Calculates the infusion rate by dividing volume to be infused by time

Test                     calcRate_timeZero_shouldbe_zero()

Setup                   Volume to be infused set to 4, time is 0

Assertion              assertEquals(smed.infusionRate, 0, 0);

                            Test ensures that dividing by zero in this function results in an infusion rate of 0 and not an error or NAN

2. What results did you get when you ran your tests, did any fail? If so why? If not, why not? Include any relevant screenshots to support your answer.

3. How did you decide on any values used in your oracles/assertions?

4. If you were going to test more comprehensively what would be an appropriate strategy for determining an appropriate set of inputs specifically for your application? Why?

Part Two:

Using any capture/replay tool of your choice (I recommend Marathon which is freely available from GITHub but there are others so use anything suitable) record a set of tests for the SimpleCalendar application (I have provided the code files) using the following process:

i. Identify 5 user tasks that can be performed with SimpleCalendar

ii. Write down the sequence of interactions required to perform each of the tasks you have chosen.

iii. Use the capture/replay tool to record these sequences of interactions as 5 test recordings

iv. Identify interaction points that should be tested and add these to your recorded sequences

1. In your report you should describe each of the 4 points above, in addition explain the choices you have made for (iv) and describe the tests that you have written for these.

2. Did you discover any errors or unexpected behaviours when testing SimpleCalendar?

3. How comprehensively do you think the recorded sequences and your tests tested the SimpleCalendar tasks? What would you need to do to make the testing more comprehensive (still just using capture/replay?)

4. Evaluate the tool you have used in terms of how easy it was to download and install, how easy it was to learn to use, how easy it was to record interaction sequences and tests, how easy it was to interpret results, how effective overall you thought the tool was. Provide screenshots as required to support your arguments.

Part Three - for COMP526 students only

Use the jfc-GUI-Ripper tool from the GUITAR framework with the sample application you created for assignment one.

1. Run the ripper (you will need configure any of the terminal widgets to ensure it can completely generate the graph). What additional information do you need to supply (e.g. input strings for textfields) in order to try and complete the graph? Were you able to generate a complete graph from your application?

2. Use a visualization tool like GraphViz to view the events graph. How does this compare to the PIM you developed for assignment one?

4: Describe the benefits and shortcomings of each of the approaches you have used in this assignment - Unit testing, capture/replay, GUITAR. Did you prefer one over the other? Why? How do you think you could improve any of them to assist in making the testing more comprehensive?

Attachment:- Assignment.rar

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Comp426526 - 16a assignment using junit write a set of unit
Reference No:- TGS01409690

Expected delivery within 24 Hours