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

@QueryMap contains jacocoData artifacts when testing code coverage #839

Closed
shaburov opened this issue Nov 12, 2018 · 2 comments
Closed

@QueryMap contains jacocoData artifacts when testing code coverage #839

shaburov opened this issue Nov 12, 2018 · 2 comments

Comments

@shaburov
Copy link

Interfase

    @RequestLine(value = "GET /api/v2/get_cases/{project_id}")
    List<Case> getCases(@Param("project_id") Integer pID, @QueryMap GetCasesQueryMap queryMap);

Example test

void unitTest_20181112134620() {
            GetCasesQueryMap map = new GetCasesQueryMap();
            map.setTypeId(3);
            CLIENT.getCases(34530, map);
            assertThat(TEST_LOGGER.takeLoggedMessages().toString())
                    .contains(GET_API + "/get_cases/34530&type_id=3 HTTP/1.1");
        }

Run test with jacoco from IDE or console

image

Expected

GET http://localhost:19876/api/v2/get_cases/34530?type_id=3 HTTP/1.1

Actual contains lambda jacocoData

[TestRailClient#getCases] ---> GET http://localhost:19876/api/v2/get_cases/34530?type_id=3&%24jacocoData=%5BZ%4054c5a2ff HTTP/1.1

image

@velo
Copy link
Member

velo commented Nov 12, 2018

So, jacoco is adding a synthetic field and we are not filtering them out....

ouch, added a PR to fix this

@shaburov
Copy link
Author

Thanks!!!

@velo velo closed this as completed Nov 13, 2018
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

No branches or pull requests

2 participants