Skip to content

feat: add automation_status field to test case creation #116

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

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

cbowerQ2
Copy link

🔧 Add automation_status field to test case creation

📋 Summary

This PR adds support for the automation_status field when creating test cases via the BrowserStack Test Management API. This field allows users to specify the automation status of test cases (e.g., not_automated, automated, automation_not_required) directly during creation.

🎯 Motivation

The automation_status field is already supported by the BrowserStack Test Management API and is returned in API responses, but was not exposed in the MCP server's test case creation functionality. This created a gap where users couldn't set this important QA workflow field during test case creation.

🔍 What Changed

  • Added automation_status?: string to TestCaseCreateRequest interface
  • Added optional automation_status field to the Zod schema with validation and documentation
  • Updated sanitizeArgs() function to handle null values for the new field
  • Added test coverage for the new field

Backward Compatibility

  • Fully backward compatible - the field is optional
  • Existing code continues to work unchanged
  • No breaking changes to the API surface

🧪 Testing

  • ✅ All existing tests pass
  • ✅ Added test case with automation_status field
  • ✅ Schema validation works correctly
  • ✅ Handles optional/null values properly

📚 API Reference

This aligns with the official BrowserStack API documentation:

🎉 Impact

Users can now fully manage test case automation status through the MCP server, enabling complete QA workflow automation without manual steps in the BrowserStack UI.

Files Changed: 2 files, 9 insertions

  • src/tools/testmanagement-utils/create-testcase.ts - Core implementation
  • tests/tools/testmanagement.test.ts - Test coverage

- Add automation_status as optional field to TestCaseCreateRequest interface
- Add Zod schema validation with documentation for common values
- Update sanitizeArgs function to handle automation_status null values
- Add test coverage for the new field
- Maintains backward compatibility (optional field)
@ruturaj-browserstack
Copy link
Contributor

Thanks for the PR, @cbowerQ2 🎉
@Vishalan please go ahead and merge — I’ve tested it and everything works as expected. ✅

@Vishalan Vishalan merged commit e00b27b into browserstack:main Aug 12, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

4 participants