Challenging One Test Multiple Times - Google Tests

I am trying to do a little random testing on the part of the software that I am developing.
I have a fixture that initializes with random values, so each test will have a different input.

In addition, I want to run one of these tests several times (I expect the device will be initialized randomly for each execution), is this possible in Google Tests? I need this to be in code, so as not to use an argument or anything like that.

I am looking for something like invocationCountin JUnit.

+8
source share
1 answer

, Range()

class Fixture : public ::testing::TestWithParam<int> {
    //Random initialisation
};

TEST_P(Fixture, Test1){}

INSTANTIATE_TEST_CASE_P(Instantiation, Fixture, ::testing::Range(1, 11));

Test1 10 ( , 11, ), .

+10

All Articles