Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

auto-generate test for an individual unit within a module (C/C++ 10.4.1)

sketkar
sketkar Posts: 16

Hello,

I am able to auto-generate test cases at a module level (c-file) by using the Generate Unit Tests (Generation, say 3 test cases per function). This generates test cases for all units within the module. Is there a way to isolate and generate test case of a single unit (function) within a module?

I'm using C/C++ 10.4.1.

Thanks,

Comments

  • Andrey Madan
    Andrey Madan Posts: 388 ✭✭✭

    @sketkar
    Good question.
    What I normally do is one of the two things:
    1) Remove all unnecessary test cases after I auto generate. This can easily be done in the Test Case Editor.
    2) Create unit tests for the unit of interest using the New Test Case using Wizard operation.
    You can constrain the max number of test cases for each unit.
    However, it's not possible to do exactly what you asking for.

  • sketkar
    sketkar Posts: 16

    Andrey,

    Trying to get the nomenclature correct.

    Step 2. Create unit tests for the unit of interest using New Test Case using Wizard operation, you mean the Generate Unit Test --> Generation as before or is this a different menu option/perspective?

    Thanks,

  • sketkar
    sketkar Posts: 16

    Andrey,

    Nevermind, we found the Wizard option the right-click context for the module under test.

    Thanks,