dfki-ric / ugv_nav4d

A 4D (X,Y,Z, Theta) Planner for unmaned ground vehicles (UGVs).
https://dfki-ric.github.io/ugv_nav4d/
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Unit Tests and CI #8

Open soraxas opened 4 months ago

soraxas commented 4 months ago

Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?

In https://github.com/dfki-ric/ugv_nav4d/blob/main/src/test/test_ugv_nav4d.cpp there contains a few google test function. But I wouldn't call it unit testing as it's only setting up 1 scenario and tested:

Can we have some more structured unit testing in the traditional sense?

(part of https://github.com/openjournals/joss-reviews/issues/6983)

soraxas commented 4 months ago

The CI file in https://github.com/dfki-ric/ugv_nav4d/blob/main/.gitlab-ci.yml is using Gitlab format.

Presumably, it's from dfki-ric's private gitlab instance? If this public instance will be in Github, you should use github action instead

https://docs.github.com/en/actions

haider8645 commented 3 months ago

Build CI: Added github actions based build CI

Unit Testing: The current tests test basic functionality of the planner. If you want something else then can you point me to an example implementation on another library? Thanks!

soraxas commented 2 months ago

Some C++ examples:

https://github.com/tbrown122387/pf/tree/master/test

https://github.com/kdm9/libqcpp/tree/master/src/tests

Both of these are JOSS C++ libraries

planthaber commented 2 months ago

The tests are located here: https://github.com/dfki-ric/ugv_nav4d/tree/main/src/test

@haider8645: Add the TESTS_ENABLED=ON cmake option, ply download and running the tests in the github action.

soraxas commented 2 months ago

Thanks @planthaber but that's what I've already linked in the OP.

As mentioned, some form of unit test would be better (there's only one file in the folder, contains only integration test, i.e., end-to-end test).

E.g. From a quick glance, (non-exhaustive list) your repo has things like Dijkstra algorithm, EnvironmentXYZTheta, compute motion, etc. These are individual item can be use some form tests.

haider8645 commented 2 months ago

ply download

uploaded the ply files to zenodo. They just need to be added to our organization by the curators and then can remove the test files from repo and update docu and action

haider8645 commented 2 weeks ago

@soraxas I am working on the unit tests.

haider8645 commented 3 days ago

@soraxas I have added some unit tests here for core classes and their functionality. I will made more units over time but for starters hopefully this is enough to test the publication through to joss

https://github.com/dfki-ric/ugv_nav4d/pull/18

soraxas commented 2 days ago

Will review, thanks