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 Test case Generation

Options
prince
prince Posts: 11
edited December 2018 in C/C++test

Hi @Mirek @Bogdan Czwartkowski

I have a general query for auto test case generation.
On which basis, C++ test tool generate the test case .
How to identify from where it is taking the input for test case generation .

Comments

  • Mirek
    Mirek Posts: 141 admin
    Options

    Hi @prince ,

    For automatic test cases generation C/C++test analyzes:

    • function signature, specifically the types of parameters and return value. For every parameter, based on the type of the parameter it is trying to generate set of corner case values, like min value, maximum value, 0, +1, -1 (of course this depends on the type of the parameter).
    • function body, looking for constants and literals that could be used as inputs
    • available factory functions/methods that can be used to produce inputs applicable for function parameters

    Having all these values C++test is randomly selecting some set of combinations depending on the desired number of test cases to be generated.

    In the test configuration, there is a dedicated tab where the user can fine-tune specific settings for test cases generation, like not using "null" or using only factory functions. Also, the number of automatically generated test cases is configurable - default is 10

  • prince
    prince Posts: 11
    Options

    Thanks for your Response sir @Mirek