frksteenhoff / ClimApp

Codebase for prototype and final version of the smartphone application ClimApp, a project under the European Research Area for Climate Services. The application is available for iOS and Android in App Stroe and Google Play respectively.
https://www.lth.se/climapp/
4 stars 2 forks source link

Create unit test for code #96

Open frksteenhoff opened 5 years ago

frksteenhoff commented 5 years ago

Description of the testing frameworks and how to set up a test is added in the wiki Unit and UI testing of ClimApp

Code to test (functionality) Henriette will create the basic setup and test cases.

Code to test (UI)

Set up automated CI/CD flow

When this is working remember to always test before commit npm run test

frksteenhoff commented 5 years ago

An example from testing the gaugeTitleCold(val) function: image

(last test case checks for values > 5, text has been updated)

frksteenhoff commented 5 years ago

Works has been moved to the heste_unittesting branch

frksteenhoff commented 5 years ago

Because of the large number of changes to the code base during 2019, it has been hard to keep up with testing. The implemented tests fail because the logic have changed and because we are no longer relying on the knowledgebase as heavily as before.

It would be nice to automate some testing of the code, but we would need someone to dedicate time to it. I will not be able to do this before I leave.