Skip to content

Add fuzzer executions as standard tests in parameterized tests #1161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

sofurihafe
Copy link
Member

@sofurihafe sofurihafe commented Oct 14, 2022

Description

Fuzzing process doesn't know anything about mocking taking place, so it was decided to substitute their parameterized tests to standard ones in parameterized test generation mode.
Also, the PR contains some refactoring.

Fixes #1137

Type of Change

  • Refactoring (typos and non-functional changes)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Automated Testing

UtBot samples.

Manual Scenario

Generate a parameterized test for the following code:

public int complexCompare(int a, int b) {
    int c = 11;
    if ((a < b) && (b < c)) {
        return 0;
    }
    if ((a < b) && (b > c)) {
        return 1;
    }
    if ((a == b) && (b == c)) {
        return 3;
    }
    return 6;
}

Verify that there are a parameterized test with its data providers and some standard tests for fuzzed executions.

@sofurihafe sofurihafe force-pushed the andrey-t/1137-fuzzed-execs branch from 0429074 to 8af19ca Compare October 21, 2022 06:19
@sofurihafe sofurihafe marked this pull request as ready for review October 21, 2022 06:31
@sofurihafe sofurihafe linked an issue Oct 21, 2022 that may be closed by this pull request
@sofurihafe sofurihafe force-pushed the andrey-t/1137-fuzzed-execs branch from 8af19ca to 21b13af Compare October 21, 2022 08:17
@EgorkaKulikov EgorkaKulikov merged commit c91f383 into main Oct 21, 2022
@EgorkaKulikov EgorkaKulikov deleted the andrey-t/1137-fuzzed-execs branch October 21, 2022 11:04
testCaseTestMethods += methodConstructor.createTestMethod(methodUnderTest, execution)
}

regions += CgSimpleRegion(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something strange, changed the logic of clustering in the apropriate place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add fuzzer executions in parameterized tests mode
3 participants