How vidyutchakrabarti/testx works
Project type and purpose
• This is an open-source test-generation framework (“TestX”) that uses gcov to auto-generate and validate test inputs for user-provided functions operating on common data structures (linked list, graph, trie).
File structure
• Top-level:
• LICENSE, README.md – project metadata
• data-structures/ – three subfolders (LL, Graph, trie), each containing:
– Makefile, source files for DS implementation, “instrumented” versions, user_function.cpp/h, test/ (auto-generated testcases + harness Makefile & runner).
• prototype/ – sample code.cpp + input/output files + run_tests.sh as a quick demo.
• testgenerators/ – core engine:
– Makefile that builds libtg.a
– coveragelogger, testgenerator, valuegenerators, etc., which together generate test inputs based on coverage feedback.
• Patterns:
• Plugin-style modules: each data structure subfolder links against libtg.a.
• Two-phase workflow: generation (using instrumented code + gcov) → execution (running generated JSON against user_function + gcov report).
README for additional insights
• It describes exactly the two-stage process:
1) Build libtg.a in testgenerators
2) In each DS folder, drop your code in user_function.cpp, run make → generate JSON testcases until ≥80% coverage
3) In DS/test folder, run make → executes tests and emits gcov reports
• Mentions storage of testcases in JSON under testcases/