.TH "doc_decisions_unit_testing_md" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME doc_decisions_unit_testing_md \- C++ Unit Testing Framework .SS "Issue" .PP The previous unit testing framework started as hack to have a bit more than simple asserts\&. It is not easy to use (needs explicit enumeration of all testcases) and lacks of really important features (e\&.g\&. output of the assertion that failed)\&. .PP .SS "Constraints" .PP .IP "\(bu" 2 Must be BSD licenced .IP "\(bu" 2 Must be easy to use .IP "\(bu" 2 should be portable .IP "\(bu" 2 container testing? .IP "\(bu" 2 mocking? .PP .PP .SS "Assumptions" .PP .SS "Considered Alternatives" .PP .IP "\(bu" 2 Continue with current framework .IP "\(bu" 2 Boost Unit Testing framework .PP .PP .SS "Decision" .PP .IP "\(bu" 2 Google Unit testing framework with code embedded in Elektra for systems where no source is installed (Debian Wheezy, Arch Linux, Fedora,\&.\&.\&.) .PP .PP .SS "Argument" .PP .IP "\(bu" 2 Having the output of current values when an assertion fails in any case .IP "\(bu" 2 No listing of all test cases in main (but instead having test discovery) .IP "\(bu" 2 No more commenting out if you only want to run parts of the test-suite .IP "\(bu" 2 No more typos in test-suite namings .IP "\(bu" 2 xUnit output for jenkins .IP "\(bu" 2 value and type-parameterized tests .IP "\(bu" 2 Mock-Support (not available in gtest?) .IP "\(bu" 2 setup/teardown global+per test .IP "\(bu" 2 supports death tests .IP "\(bu" 2 writing many parts of it on our own adds to the total amount of code to write and maintain\&. .IP "\(bu" 2 integrations into IDEs .PP .PP .SS "Implications" .PP .IP "\(bu" 2 It adds lots of code in the repository .IP "\(bu" 2 It is not ideal to have different frameworks intermixed (C vs\&. C++ frameworks, but most code is C) .IP "\(bu" 2 In the end we have to write a lot of functionality ourselves anyway (e\&.g\&. comparing Keys and KeySets) .IP "\(bu" 2 Testsuite execution are already handled by cmake and kdb run-all\&. .IP "\(bu" 2 The selection of tests within a test suite does not play well with ctest\&. .IP "\(bu" 2 Rewriting all current tests to have unified behaviour is a lot of work .IP "\(bu" 2 Wont work for ABI compatibility tests .IP "\(bu" 2 Mock only by extra framework .PP .PP .SS "Related decisions" .PP .IP "\(bu" 2 \fBScript Testing\fP .PP .PP .SS "Notes" .PP .IP "\(bu" 2 We had discussions on Mailinglists .IP "\(bu" 2 We had discussions on \fCgithub\fP .PP