Data Logger using Raspberry Pi Scott Cairns 1817523


Testing and Evaluation 4.1Testing



Download 200.65 Kb.
Page7/12
Date31.07.2017
Size200.65 Kb.
#25490
1   2   3   4   5   6   7   8   9   ...   12

4Testing and Evaluation

4.1Testing


The testing done on this project will include the use of Scenario testing. Scenario testing is a testing method which makes use of hypothetical stories as the test cases, these scenarios attempt to replicate what the end user wishes to use the software for. Scenario testing will use a list of scenarios and ensure that each part of the program has run with various different cases. These test cases will run through every bit of code in the program ensuring there are no issues with coding.

4.1.1Data logging over the network


  • Test case – Enabling data logging, streaming webcam feed over the network

    • In this test case, the goal was to enable data logging and stream the webcam feed over the network. To do this it required changing the logging method and starting the logging.

  • Test steps – Run the program, press the middle button (or 2), press the left button (or 1)

  • Expected results – The program should show information then start streaming over the network with the ability to connect to it via VLC

  • Result – Pass, as expected (Figure 5)

screenshot1945

Outcome of first test case

4.1.2Data logging on the SD card


  • Test case – Enabling data logging, storing the webcam feed on the SD card

    • In this test case, the goal was to enable data logging and store the webcam feed on to the SD card. To do this it required starting the logging.

  • Test steps – Run the program, press the left button (or 1)

  • Expected results – The program should show information then start recording to the SD card

  • Result – Pass, as expected (Figure 6)

screenshot1946

Outcome of second test case

4.1.3Taking a single image


  • Test case – Taking a single image

    • In this test case, the goal was to take a photograph of a single image and store it on the SD card. To do this required pressing the button for a single image capture.

  • Test steps – Run the program, press the right button (or 3)

  • Expected results – The program should show that it is taking an image then store it

  • Result – Pass, as expected (Figure 7)

screenshot1947

Outcome of the third test case

4.1.4Data logging with no webcam plugged in


  • Test case – Enabling data logging with no webcam plugged in

    • In this test case, the goal was to enable data logging with no webcam plugged in to the USB slots. This would show if one part of the system fails the rest will continue to function as normal and record the gpio sensors.

  • Test steps – Remove the webcam from USB, run the program, press the left button (or 1)

  • Expected results – The stream will not continue and report an error, but the gpio sensors will continue to log

  • Result – Pass, as expected (Figure 8)

screenshot1948

Outcome of the fourth test case

4.1.5Single image capture with no webcam plugged in


  • Test case – Taking a single image with no webcam plugged in

    • In this test case, the goal was to take a photograph of a single image and store it on the SD card with no webcam plugged in to the USB slots.

  • Test steps – Remove the webcam from USB, run the program, press the right button (or 3)

  • Expected results – An error will occur stating it cannot open the device and fail to continue

  • Result – Pass, as expected (Figure 9)

screenshot1949

Outcome of the fifth test case

4.1.6Using unauthorised keys


  • Test case – Pressing keys which are not assigned to do something checking the result

    • In this test case, the goal was to press keys which are not assigned by the Python program to do anything, showing the feedback the user gets and continuing to function as before.

  • Test steps – Run the program, press random keys

  • Expected results – A message will appear stating that key is unusable

  • Result – Pass, as expected (Figure 10)

screenshot1950

Outcome of the sixth test case

4.1.7Testing the optical sensor


  • Test case – Flashing a light on the optical sensor to attempt to alter the readings

    • In this test case, the goal was to test the accuracy and reliability of the optical sensor by altering the light available to the sensor (through use of a torch) ensuring that it reports lower readings if the light increases.

  • Test steps – Record five optical sensor readings, put a flashlight near the optical sensor and record another five while altering the brightness of the flashlight (first 2 – full brightness, 3rd – medium brightness, 4th – lowest brightness, 5th – off)

  • Expected results – Second five numbers should be lower than first five

  • Result – Pass, as expected (Figure 11)

    • First five: 86, 87, 88, 90, 87

    • Second five: 0, 0, 0, 48, 80


screenshot1964

Outcome of the seventh test case

4.1.8Testing the temperature sensor


  • Test case – Place freezing item next to temperature sensor to attempt to alter the readings

    • In this test case, the goal was to test the accuracy and reliability of the temperature sensor by altering the temperature around the sensor (using a frozen item), ensuring that it reports a lower temperature when the item is next to it than prior to it being there.

  • Test steps – Record five temperature sensor readings, put a frozen item next to the temperature sensor and record another five

  • Expected results – Second five numbers should be considerably lower than the first five

  • Result – Pass, as expected (Figure 12)

    • First five: 17.0, 17.0, 17.0, 17.0, 17.7

    • Second five: 10.9, 10.9, 9.3, 9.0, 8.7


screenshot1965

screenshot1961

Outcome of the eight test case

4.1.9Using a standard user account


  • Test case – Running the data logger with a standard user (not root) who has no access to specific parts of the system that is required for data logging

    • In this test case, the goal was to use a standard user account to attempt to run the data logger which requires root access.

  • Test steps – Log into the Pi using ‘pi’ user, run the program

  • Expected results – Inability to access GPIO

  • Result – Pass, as expected (Figure 13)

screenshot1951

Outcome of the ninth test case


Directory: ~aka

Download 200.65 Kb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   12




The database is protected by copyright ©ininet.org 2024
send message

    Main page