diff --git a/dev/developers/testing/index.html b/dev/developers/testing/index.html index 0808e2de..35402c46 100644 --- a/dev/developers/testing/index.html +++ b/dev/developers/testing/index.html @@ -1718,37 +1718,35 @@
Testing Overview
  1. You have to create a single four day test dataset for the sensor you are working on.
  2. You will adjust your dataset with tests/script/assign_test_timestamps.py to fit Fri March 6th 2020 - Mon March 9th 2020 and Fri Oct 30th 2020 - Mon Nov 2nd 2020. We test daylight saving times with these dates.
  3. -
  4. We have a one test participant per platform (pids: android, ios, fitbit, empatica, empty). The data device_id should be equal to the pid.
  5. +
  6. We have one test participant per platform (pids: android, ios, fitbit, empatica, empty). The data device_id should be equal to the pid.
  7. We will run this test dataset against six test pipelines, three for frequency, periodic, and event time segments in a single time zone, and the same three in multiple time zones.
  8. You will have to create your test data to cover as many corner cases as possible. These cases depend on the sensor you are working on.
  9. The time segments and time zones to be tested are:
Frequency
Periodic
Event
Single time zone to test

America/New_York

Multi time zones to test
@@ -1846,11 +1844,25 @@
Add raw input data.
  1. Add the raw test data to the corresponding sensor CSV file in tests/data/manual/aware_csv/SENSOR_raw.csv. Create the CSV if it does not exist.
  2. The test data you create will have the same columns as normal raw data except test_time replaces timestamp. To make your life easier, you can place a test data row in time using the test_time column with the following format: Day HH:MM:SS.XXX, for example Fri 22:54:30.597.
  3. -
  4. You will convert your manual test data to actual raw test data by running python tests/script/assign_test_timestamps.py
  5. -
  6. The script assign_test_timestamps.py converts you test_time column into a timestamp. For example, Fri 22:54:30.597 is converted to 1583553270597 (Fri Mar 06 2020 22:54:30 GMT-0500) and to 1604112870597 (Fri Oct 30 2020 22:54:30 GMT-0400). Note we respect milliseconds and our test timezones (New_York and Los_Angeles)
  7. -
  8. The device_id should be the pid
  9. -
  10. Create your participant file if it does not exist yet (tests/data/external/participant_files/{pid}.yaml).
  11. -
  12. Don’t forget to add the pid to [PIDS] in the config file of the time segments you are testing (see below).
  13. +
  14. +

    You can convert your manual test data to actual raw test data with the following commands:

    +
      +
    • +

      For the selected files: (It could be a single file name or multiple file names separated by whitespace(s)) +

      python tests/script/assign_test_timestamps.py -f file_name_1 file_name_2
      +

      +
    • +
    • +

      For all files under the tests/data/manual/aware_csv folder: +

      python tests/script/assign_test_timestamps.py -a
      +

      +
    • +
    +
  15. +
  16. +

    The script assign_test_timestamps.py converts you test_time column into a timestamp. For example, Fri 22:54:30.597 is converted to 1583553270597 (Fri Mar 06 2020 22:54:30 GMT-0500) and to 1604112870597 (Fri Oct 30 2020 22:54:30 GMT-0400). Note you can include milliseconds.

    +
  17. +
  18. The device_id should be the same as pid.
Example of test data you need to create

The test_time column will be automatically converted to a timestamp that fitst our testing periods in March and November by tests/script/assign_test_timestamps.py

test_time,device_id,battery_level,battery_scale,battery_status
@@ -1903,178 +1915,6 @@ bash tests/scripts/run_tests.sh -t stz_frequency -a test
 
 
How does the test execution work?

This bash script tests/scripts/run_tests.sh executes one or all test pipelines for different time segment types (frequency, periodic, and events) and single or multiple timezones.

The python script tests/scripts/run_tests.py runs the tests. It parses the involved participants and active sensor providers in the config.yaml file of the time segment type and time zone being tested. We test that the output file we expect exists and that its content matches the expected values.

-
Example of raw data for PHONE_APPLICATIONS_FOREGROUND testing
 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
"timestamp","device_id","package_name","application_name","is_system_app"
-1593946320761,"test01","tv.twitch.android.app","Twitch",0
-1593961974942,"test01","com.google.android.gms","Google",1
-1593958144033,"test01","tv.twitch.android.app","Twitch",0
-1593947228964,"test01","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1593951572326,"test01","com.netflix.mediaclient","Netflix",0
-1593950554868,"test01","com.supercell.clashofclans","Clash of Clans",0
-1593964799620,"test01","tv.twitch.android.app","Twitch",0
-1593974241305,"test01","com.facebook.moments","Facebook Moments",0
-1593969483540,"test01","com.facebook.moments","Facebook Moments",0
-1593977289581,"test01","com.fitbit.FitbitMobile","Fitbit",0
-1593970763367,"test01","com.netflix.mediaclient","Netflix",0
-1593964867720,"test01","com.supercell.clashofclans","Clash of Clans",0
-1593974942995,"test01","com.google.android.gm","Gmail",0
-1593986399351,"test01","com.netflix.mediaclient","Netflix",0
-1594000139073,"test01","com.google.android.gm","Gmail",0
-1593994717099,"test01","com.fitbit.FitbitMobile","Fitbit",0
-1593985854872,"test01","com.google.android.youtube","Youtube",0
-1594003154390,"test01","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1594003853415,"test01","com.google.android.gms","Google",1
-1593991680045,"test01","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1594007999202,"test01","com.aware.plugin.upmc.cancer","AWARE",0
-1593939733998,"test01","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1593933324739,"test01","tv.twitch.android.app","Twitch",0
-1593925161482,"test01","com.facebook.moments","Facebook Moments",0
-1593936918763,"test01","com.google.android.gms","Google",1
-1593924155524,"test01","com.google.android.youtube","Youtube",0
-1593922625358,"test01","com.facebook.moments","Facebook Moments",0
-1593943199317,"test01","tv.twitch.android.app","Twitch",0
-1593951550550,"test01","com.google.android.gms","Google",1
-1593981544544,"test01","com.google.android.gms","Google",1
-1593999779779,"test01","com.google.android.gms","Google",1
-1593933565565,"test01","com.google.android.gms","Google",1
-1602475200000,"test05","tv.twitch.android.app","Twitch",0
-1602475200000,"test05","com.netflix.mediaclient","Netflix",0
-1602475200000,"test05","com.google.android.gms","Google",1
-1602475200000,"test05","com.facebook.moments","Facebook Moments",0
-1602475999000,"test05","tv.twitch.android.app","Twitch",0
-1602475999000,"test05","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1602476999000,"test05","com.netflix.mediaclient","Netflix",0
-1602476999000,"test05","com.supercell.clashofclans","Clash of Clans",0
-1602476999000,"test05","com.netflix.mediaclient","Netflix",0
-1602476999000,"test05","com.supercell.clashofclans","Clash of Clans",0
-1602477000000,"test05","tv.twitch.android.app","Twitch",0
-1602477000000,"test05","com.facebook.moments","Facebook Moments",0
-1602477000000,"test05","com.google.android.gm","Gmail",0
-1602478000000,"test05","com.facebook.moments","Facebook Moments",0
-1602478000000,"test05","com.fitbit.FitbitMobile","Fitbit",0
-1602478799000,"test05","com.google.android.gm","Gmail",0
-1602478799000,"test05","com.netflix.mediaclient","Netflix",0
-1602478000000,"test05","com.fitbit.FitbitMobile","Fitbit",0
-1602478799000,"test05","com.google.android.gm","Gmail",0
-1602478799000,"test05","com.supercell.clashofclans","Clash of Clans",0
-1602478799000,"test05","com.netflix.mediaclient","Netflix",0
-1602478800000,"test05","com.google.android.gm","Gmail",0
-1602478800000,"test05","com.fitbit.FitbitMobile","Fitbit",0
-1602478800000,"test05","com.google.android.gm","Gmail",0
-1602478800000,"test05","com.fitbit.FitbitMobile","Fitbit",0
-1602480500000,"test05","com.netflix.mediaclient","Netflix",0
-1602480500000,"test05","com.supercell.clashofclans","Clash of Clans",0
-1602480500000,"test05","com.supercell.clashofclans","Clash of Clans",0
-1602558000000,"test05","com.google.android.youtube","Youtube",0
-1602558000000,"test05","com.google.android.youtube","Youtube",0
-1602558000000,"test05","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1602558799000,"test05","com.google.android.gms","Google",1
-1602558799000,"test05","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1602558000000,"test05","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1602558799000,"test05","com.google.android.gms","Google",1
-1602558799000,"test05","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1602559799000,"test05","com.aware.plugin.upmc.cancer","AWARE",0
-1602559799000,"test05","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1602559799000,"test05","com.aware.plugin.upmc.cancer","AWARE",0
-1602559799000,"test05","com.google.android.apps.youtube.creator","Youtube Video Creater",0
-1602559800000,"test05","tv.twitch.android.app","Twitch",0
-1602559800000,"test05","com.facebook.moments","Facebook Moments",0
-1602560800000,"test05","com.google.android.gms","Google",1
-1602560800000,"test05","com.google.android.youtube","Youtube",0
-1602560800000,"test05","com.google.android.gms","Google",1
-1602560800000,"test05","com.google.android.youtube","Youtube",0
-1602561599000,"test05","com.facebook.moments","Facebook Moments",0
-1602561599000,"test05","tv.twitch.android.app","Twitch",0
-1602561600000,"test05","com.google.android.gms","Google",1
-1602561600000,"test05","com.google.android.gms","Google",1
-1602563400000,"test05","com.google.android.gms","Google",1
-1602563500000,"test05","com.facebook.moments","Facebook Moments",0
-
-
-
Output Example

The following is a snippet of the output you should see after running your test.

test_sensors_files_exist (test_sensor_features.TestSensorFeatures) ... stz_periodic
diff --git a/dev/sitemap.xml b/dev/sitemap.xml
index c82d083a..be3c6d62 100644
--- a/dev/sitemap.xml
+++ b/dev/sitemap.xml
@@ -1,279 +1,279 @@
 
 
      https://www.rapids.science/dev/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/setup/overview/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/workflow-examples/minimal/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/setup/installation/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/setup/configuration/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/setup/execution/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/citation/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/data-streams-introduction/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/aware-mysql/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/aware-csv/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/aware-influxdb/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/mandatory-phone-format/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/fitbitjson-mysql/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/fitbitjson-csv/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/fitbitparsed-mysql/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/fitbitparsed-csv/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/mandatory-fitbit-format/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/empatica-zip/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/mandatory-empatica-format/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/datastreams/add-new-data-streams/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/feature-introduction/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-accelerometer/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-activity-recognition/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-applications-crashes/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-applications-foreground/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-applications-notifications/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-battery/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-bluetooth/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-calls/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-conversation/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-data-yield/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-keyboard/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-light/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-locations/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-log/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-messages/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-screen/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-wifi-connected/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/phone-wifi-visible/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/fitbit-data-yield/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/fitbit-heartrate-summary/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/fitbit-heartrate-intraday/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/fitbit-sleep-summary/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/fitbit-sleep-intraday/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/fitbit-steps-summary/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/fitbit-steps-intraday/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/empatica-accelerometer/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/empatica-heartrate/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/empatica-temperature/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/empatica-electrodermal-activity/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/empatica-blood-volume-pulse/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/empatica-inter-beat-interval/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/empatica-tags/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/features/add-new-features/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/visualizations/data-quality-visualizations/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/visualizations/feature-visualizations/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/workflow-examples/analysis/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/developers/git-flow/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/developers/remote-support/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/developers/virtual-environments/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/developers/documentation/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/developers/testing/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/developers/test-cases/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/developers/validation-schema-config/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/migrating-from-old-versions/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/code_of_conduct/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/common-errors/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/team/
-     2021-04-14
+     2021-04-15
      daily
     
      https://www.rapids.science/dev/change-log/
-     2021-04-14
+     2021-04-15
      daily
     
 
\ No newline at end of file
diff --git a/dev/sitemap.xml.gz b/dev/sitemap.xml.gz
index 2c2f1d31..c9314eba 100644
Binary files a/dev/sitemap.xml.gz and b/dev/sitemap.xml.gz differ