Skip to content
EyesOfThings edited this page Feb 20, 2017 · 12 revisions

Index

  1. How to run them
  2. Tests implemented
  3. Expected output of the tests
  4. Additional information

How to run them

The steps for executing them are:

  1. Run myriad/apps/pulga_control_app in the EoT device. It will create an AP (SSID = Myriad2Wifi, password = visilabap, if the WifiFunctions library has not been modified) and will start the MQTT broker.
  2. When Pulga shows "Waiting" in the command line, run the test.py file. This test will create a MQTT client which will connect to the generated AP and will test several of the functionalities of Pulga.

Tests implemented

  1. ConnectToBrocker --> The client tests if it is able to connect to and disconnect from the broker. It also tests the connection of the client if it is already connected.
  2. SubscribeUnsubscribe --> The client tests the subscription and unsubscription from a topic.
  3. _UploadFile _--> The client tests the upload file feature.
  4. _DownloadFile _--> The client tests the download file feature.
  5. _UploadDownloadFileAreEqual _--> The test compares the downloaded file with the uploaded file.
  6. _RequestSnapshot _--> The client requests a snapshot from Pulga.
  7. _UpdateDate _--> The client tests the update date functionality.
  8. _GetDate _--> The client tests the get date functionality.
  9. _EOTMakeDirSD _--> The test creates a dir “Test” in the SD card.
  10. _EOTListFilesSD _--> The client obtains the complete list of files contained in the SD card.
  11. _EOTDeleteFileSD _--> The test deletes the file uploaded previously to the SD card.
  12. _EOTDeleteDirSD _--> The test deletes the dir “Test” from the SD card.
  13. _UploadElf _--> The test uploads an Elf binary to the flash memory of the EoT device.

Expected output of the tests

The expected output of the tests must be similar to:

test00ConnectToBroker (__main__.PulgaTests) ... Waiting for connection to reach NM_ACTIVE_CONNECTION_STATE_ACTIVATED state ...
Connection established!
ok
test01SubscribeUnsubscribe (__main__.PulgaTests) ... Check if unsubscription was successful
ok
test02UploadFile (__main__.PulgaTests) ... Uploading 000000 chunk
Uploading 000001 chunk
……
Uploading 000013 chunk
ok
test03DownloadFile (__main__.PulgaTests) ... Downloading chunk
Downloading chunk
……
Downloading chunk
ok
test04UploadDownloadFileAreEqual (__main__.PulgaTests) ... ok
test05RequestSnapshot (__main__.PulgaTests) ... ok
test06UpdateDate (__main__.PulgaTests) ... ok
test07GetDate (__main__.PulgaTests) ... ok
test08EOTMakeDirSD (__main__.PulgaTests) ... ok
test09EOTListFilesSD (__main__.PulgaTests) ... OpenCVTests;0;Thu Dec 3 12:04:36 2015
Thu Dec 3 12:04:36 2015
Thu Dec 3 12:04:36 2015
test.py;1;Fri Jan 1 00:00:18 1988
Fri Jan 1 00:00:18 1988
Fri Jan 1 00:00:18 1988
……
ok
test10EOTDeleteFileSD (__main__.PulgaTests) ... ok
test11EOTDeleteDirSD (__main__.PulgaTests) ... ok
test12UploadElf (__main__.PulgaTests) ... Uploading 000000 chunk
Uploading 000001 chunk
……
Uploading 000013 chunk
ok
----------------------------------------------- Ran 13 tests in 18.286s

Additional information

Clone this wiki locally