TBrun: Generating test cases from a Comma-Separated Value file

Duration: 10:27

𝗖𝗿𝗲𝗮𝘁𝗶𝗻𝗴 𝗧𝗲𝘀𝘁 𝗖𝗮𝘀𝗲𝘀 𝗳𝗿𝗼𝗺 𝗮 𝗖𝗦𝗩 𝗙𝗶𝗹𝗲

Need to cre­ate a large num­ber of test cases for the same func­tion? There is a faster way than using the GUI.

In this episode, Mark Richard­son demon­strates how to gen­er­ate test cases from a CSV file using the LDRA TBrun unit test­ing tool. By export­ing a sin­gle test case as a tem­plate, edit­ing it to ref­er­ence CSV columns, and run­ning a Python script, you can gen­er­ate dozens of test cases in sec­onds and import them straight into TBrun.

What you will learn:

How to import the gen­er­at­ed test cases into TBrun and run them

Why CSV-based test case gen­er­a­tion saves time when test­ing func­tions with high cyclo­mat­ic com­plex­i­ty

How to export a test case tem­plate from TBrun and edit it to ref­er­ence CSV col­umn val­ues

How to cre­ate a CSV file con­tain­ing your test inputs, expect­ed out­puts, and stub con­fig­u­ra­tions

How to run the CSV to TCF Python script pro­vid­ed with the LDRA tool suite

TASKING is driving a new era of intelligent, efficient, and audit-ready verification and validation

Speak to a TASKING Expert → LDRA Test toolsets →
Scroll to Top