core icon indicating copy to clipboard operation
core copied to clipboard

Write Postman Tests for Search AI Endpoints

Open victoralfaro-dotcms opened this issue 8 months ago • 1 comments

Parent Issue

https://github.com/dotCMS/core/issues/27973

Parent Issue

To be defined

User Story

As a Java developer, I want to write Postman tests for the following Search AI Endpoints:

  • /api/v1/ai/search | GET
  • /api/v1/ai/search | POST
  • /api/v1/ai/search/related | GET
  • /api/v1/ai/search/related | POST

Acceptance Criteria

  • Postman test collection includes tests for:
    • /api/v1/ai/search (GET)
    • /api/v1/ai/search (POST)
    • /api/v1/ai/search/related (GET)
    • /api/v1/ai/search/related (POST)
  • Tests validate successful response status and structure.
  • Tests include various valid and invalid input scenarios.
  • Test results are documented and shared with the team.

dotCMS Version

master

Proposed Objective

Quality Assurance

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

  • Slack Conversation: [link]
  • Support Ticket: [link]
  • API Documentation: [link]

Assumptions & Initiation Needs

  • Access to the Search AI endpoints.
  • Valid API keys or tokens for authentication.
  • Sample input data for search queries.

Quality Assurance Notes & Workarounds

  • Ensure that tests cover a wide range of scenarios including edge cases.
  • Verify that the API responses match the expected structure and content.
  • Perform regression testing to ensure no existing functionality is broken by these tests.

Sub-Tasks & Estimates

  1. Review API documentation for Search AI endpoints (2 hours)
  2. Set up Postman environment and variables (2 hours)
  3. Write tests for /api/v1/ai/search (GET) (3 hours)
  4. Write tests for /api/v1/ai/search (POST) (3 hours)
  5. Write tests for /api/v1/ai/search/related (GET) (3 hours)
  6. Write tests for /api/v1/ai/search/related (POST) (3 hours)
  7. Validate tests with various scenarios and inputs (4 hours)
  8. Document test results and share with the team (2 hours)
  9. Update documentation to reflect the new tests (1 hour)

Total Estimate: 23 hours

victoralfaro-dotcms avatar May 31 '24 16:05 victoralfaro-dotcms