spring cloud contract add description to auto generated method

23 views Asked by At

I have a groovy contract like:

Contract.make {
        description "When login with some params authorization token expected"
        request {
            method 'POST'
            url '/xxx/yyy'
            headers {
                contentType("application/json")
            }
            body($(execute('generateBody(null, null, null, "Hi")')))
        }
        response {
            status 200
        }
    }

It runs as expected, the problem comes when we have about 200 similar tests on the same file, when opening the generated java test class is hard to distinguish among each test.

Is there any way to include the description field inside the generated java test method?

0

There are 0 answers