Endava / cats

CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.
Apache License 2.0
1.19k stars 73 forks source link

[Functional Fuzzer] Date String Parsing Bug #83

Closed beam-me-up closed 1 year ago

beam-me-up commented 1 year ago

In my CATs test scenarios, I've observed an issue related to parsing date values. When I set a date value like '2023-03-03', the system interprets it as a mathematical expression and converts it to '2017'.

For instance, consider the following YAML examples:

/pet/findByStatus:
    test_2:
      description: Get to status
      httpMethod: GET
      status: cats
      expectedResponseCode: 200
      createdAt: '2023-03-03'

This corresponds to the 'createdAt' parameter in the OpenAPI specification:

- name: createdAt
  in: query
  description: Some random date
  schema:
    type: string

Expected behavior: The system should treat date strings like '2023-03-03' as plain strings and not perform any mathematical operations on them.

I've attached the OpenAPI YAML file for reference. Please let me know if you need any further details or clarification.

beam-me-up commented 1 year ago

openapi-date.yml

en-milie commented 1 year ago

Thank you for reporting this. A fix will be available in the next release.

en-milie commented 1 year ago

This is fixed in: https://github.com/Endava/cats/releases/tag/cats-9.0.5

en-milie commented 1 year ago

Will close this as fixed.