Auto Test case Generation

princeprince 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

  • MirekMirek Posts: 111 ✭✭✭

    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

  • princeprince Posts: 11

    Thanks for your Response sir @Mirek

Sign In or Register to comment.