Skip to content
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

Fuzzing platform smoke testing #1461

Closed
16 of 17 tasks
tyuldashev opened this issue Dec 6, 2022 · 3 comments
Closed
16 of 17 tasks

Fuzzing platform smoke testing #1461

tyuldashev opened this issue Dec 6, 2022 · 3 comments
Assignees
Labels
ctg-qa Issue is related to QA process

Comments

@tyuldashev
Copy link
Collaborator

tyuldashev commented Dec 6, 2022

Initial set-up

Check that the IntelliJ Idea UTBot plugin can be successfully installed

IntelliJ IDEA 2022.2.3
JDK 11

Go through manual scenarios

Primitive type

  • byte
  • short
  • int
  • long
  • float
  • double
  • boolean
  • char

Manual scenario #2

  • Collections
  • Arrays
  • User Objects initialization
  • More complex scenarios with user objects

Manual scenario #3

  • Test generation timeout applied
  • Combination of Fuzzer and Symbolic analysis
  • Finding parameters which causes exceptions and proper handling them
@tyuldashev tyuldashev added the ctg-qa Issue is related to QA process label Dec 6, 2022
@tyuldashev tyuldashev self-assigned this Dec 6, 2022
@tyuldashev tyuldashev moved this to Todo in UTBot Java Dec 6, 2022
@tyuldashev
Copy link
Collaborator Author

Current problems with summaries on Intigers.java:

  • Not every test have JavaDoc comment
    image

  • Tag @utbot.methodUnderTest sometimes has class under test as first parameter (but should not), so link is not resolved.
    image

  • @DisplayName could name parameters as arg_0 instead of real names.

  • @DisplayName could have phrases like mutated from min instead of actual values
    image

@tyuldashev
Copy link
Collaborator Author

Note about objects:
Now they could be init twice, first time through constructor and second time through direct field assignment. Here is the sample for tests on Arrays.Point#equals from Arrays file

        Point point = new Point(0, 1);
        point.x = 0;
        point.y = Integer.MIN_VALUE;
        Point point1 = new Point(-1, Integer.MAX_VALUE);
        point1.y = Integer.MIN_VALUE;
        point1.x = 0;

Previously only constructor was used, without later re-asignemnt:

        Point point = new Point(-1934310868, -1464141532);
        Point point1 = new Point(-1934310868, -1934310868);

@tyuldashev
Copy link
Collaborator Author

One more note about @DisplayName: there could be phrases like mutated from 3 while actual parameter value is still 3 (not mutated).

Here is one of the tests for Enums.java

    /**
     * @utbot.classUnderTest {@link Enums}
     * @utbot.methodUnderTest {@link Enums#test(int)}
     */
    @Test
    @DisplayName("test: x = mutated from 3 -> return 3")
    public void testTestReturns3() {
        Enums enums = new Enums();

        int actual = enums.test(3);

        assertEquals(3, actual);
    }

@github-project-automation github-project-automation bot moved this from Todo to Done in UTBot Java Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-qa Issue is related to QA process
Projects
Archived in project
Development

No branches or pull requests

2 participants