Opened 5 years ago

Last modified 4 months ago

#12249 assigned enhancement

Document tests / unit tests in developer docs?

Reported by: tqh Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Documentation Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I tried searching for docs on how to work with our unit tests, but didn't find any good info. What I'd hope to find is where they are (src/tests?), how to build them and how to run them.

To me it looks like you add the tests you want to the image and run them in the build. Any better way? Perhaps to run them on the host platform?

Change History (4)

comment:1 by waddlesplash, 4 years ago

Component: WebsiteDocumentation
Owner: changed from haiku-web to nielx

comment:2 by pulkomandy, 4 years ago

There are some pages about it on the website: https://www.haiku-os.org/documents/dev/unit_testing/ (deprecated, from before we were using Jam and SVN!) https://www.haiku-os.org/documents/dev/unit_testing_part_deux https://www.haiku-os.org/documents/dev/template_madness_unit_test_policy/ https://www.haiku-os.org/blog/yourpalal/2010-06-18_unit_testing_fun_and_profit/ (up to date on writing tests, but not much info on running them)

Usually I run them from Haiku like this:

jam -q unittests
UnitTester

It is currently not possible to run the tests on a non-Haiku host. It is possible to build them, and our builbots do so (this at least make sure they compile).

The UnitTester harness is the tool you will use to run the tests. It allows to run all of them, a specific one, or a group of tests. Not all the tests in src/test use the harness however, some are just simple manual test applications.

comment:3 by nielx, 7 months ago

Owner: changed from nielx to nobody
Status: newassigned

Interesting suggestion, but not for me to work on.

comment:4 by pulkomandy, 4 months ago

Milestone: Unscheduled
Note: See TracTickets for help on using tickets.