TBrun: Generating test cases from a Comma-Separated Value file
Duration: 10:27
𝗖𝗿𝗲𝗮𝘁𝗶𝗻𝗴 𝗧𝗲𝘀𝘁 𝗖𝗮𝘀𝗲𝘀 𝗳𝗿𝗼𝗺 𝗮 𝗖𝗦𝗩 𝗙𝗶𝗹𝗲
Need to create a large number of test cases for the same function? There is a faster way than using the GUI.
In this episode, Mark Richardson demonstrates how to generate test cases from a CSV file using the LDRA TBrun unit testing tool. By exporting a single test case as a template, editing it to reference CSV columns, and running a Python script, you can generate dozens of test cases in seconds and import them straight into TBrun.
What you will learn:
How to import the generated test cases into TBrun and run them
Why CSV-based test case generation saves time when testing functions with high cyclomatic complexity
How to export a test case template from TBrun and edit it to reference CSV column values
How to create a CSV file containing your test inputs, expected outputs, and stub configurations
How to run the CSV to TCF Python script provided with the LDRA tool suite