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

[Functional Fuzzer] Requesting Ability to Set Parameter Values as NULL for POST Requests in CATs #80

Closed
beam-me-up opened this issue Sep 11, 2023 · 5 comments

Comments

@beam-me-up
Copy link

In my CATs test scenarios, I've noticed a behavior related to setting values as "null." While I can use the "cats_remove_field" flag to remove parameters for GET requests, I'm facing a situation with POST requests where I want to set a parameter's value as NULL without removing it entirely.

Examples:

For instance, consider the following YAML examples:

/pet/findByStatus:
    test_2:
      description: Get to status
      httpMethod: GET
      status: null 
      expectedResponseCode: 200

In this case, I can use "cats_remove_field" for GET requests to remove the "status" parameter completely.

However, for POST requests like this:

/pet:
    test_1:
      description: Create a Pet
      httpMethod: POST
      name: null
      expectedResponseCode: 200

I don't want to remove the "name" parameter, but I need to set its value as NULL.

Question:

Is there a way to set the value of a parameter as NULL explicitly for POST requests in CATs, without removing the parameter itself?

Any guidance or solution for this situation would be greatly appreciated.

@en-milie
Copy link
Contributor

Hi @beam-me-up. I'll check a bit various scenarios and get back.

@en-milie
Copy link
Contributor

This commit 6624128 along with the fix for #75 will allow setting null values the way you have it in your example file. It will be available in next release.

@en-milie
Copy link
Contributor

This is available now in: https://github.com/Endava/cats/releases/tag/cats-9.0.2

@en-milie
Copy link
Contributor

@beam-me-up can this be closed now?

@beam-me-up
Copy link
Author

Yes please. Thank you.

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