diff --git a/qase-api-client/docs/ResultsApi.md b/qase-api-client/docs/ResultsApi.md index 2a2f6691..97764a4f 100644 --- a/qase-api-client/docs/ResultsApi.md +++ b/qase-api-client/docs/ResultsApi.md @@ -110,7 +110,7 @@ Bulk create test run result This method allows to create a lot of test run result at once. -If you try to send more than 2,000 results in a single bulk request, you will receive an error with code 413 - Payload Too Large. +If you try to send more than 200 results in a single bulk request, you will receive an error with code 413 - Payload Too Large. If there is no free space left in your team account, when attempting to upload an attachment, e.g., through reporters, you will receive an error with code 507 - Insufficient Storage. diff --git a/qase-api-client/pyproject.toml b/qase-api-client/pyproject.toml index 8aba0bb7..3881c9f4 100644 --- a/qase-api-client/pyproject.toml +++ b/qase-api-client/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-api-client" -version = "2.0.13" +version = "2.0.14" description = "Qase TestOps API V1 client for Python" readme = "README.md" authors = [{name = "Qase Team", email = "support@qase.io"}] diff --git a/qase-api-client/src/qase/api_client_v1/api/results_api.py b/qase-api-client/src/qase/api_client_v1/api/results_api.py index b1a9fb16..d9b3e369 100644 --- a/qase-api-client/src/qase/api_client_v1/api/results_api.py +++ b/qase-api-client/src/qase/api_client_v1/api/results_api.py @@ -389,7 +389,7 @@ def create_result_bulk( ) -> BaseResponse: """Bulk create test run result - This method allows to create a lot of test run result at once. If you try to send more than 2,000 results in a single bulk request, you will receive an error with code 413 - Payload Too Large. If there is no free space left in your team account, when attempting to upload an attachment, e.g., through reporters, you will receive an error with code 507 - Insufficient Storage. + This method allows to create a lot of test run result at once. If you try to send more than 200 results in a single bulk request, you will receive an error with code 413 - Payload Too Large. If there is no free space left in your team account, when attempting to upload an attachment, e.g., through reporters, you will receive an error with code 507 - Insufficient Storage. :param code: Code of project, where to search entities. (required) :type code: str @@ -471,7 +471,7 @@ def create_result_bulk_with_http_info( ) -> ApiResponse[BaseResponse]: """Bulk create test run result - This method allows to create a lot of test run result at once. If you try to send more than 2,000 results in a single bulk request, you will receive an error with code 413 - Payload Too Large. If there is no free space left in your team account, when attempting to upload an attachment, e.g., through reporters, you will receive an error with code 507 - Insufficient Storage. + This method allows to create a lot of test run result at once. If you try to send more than 200 results in a single bulk request, you will receive an error with code 413 - Payload Too Large. If there is no free space left in your team account, when attempting to upload an attachment, e.g., through reporters, you will receive an error with code 507 - Insufficient Storage. :param code: Code of project, where to search entities. (required) :type code: str @@ -553,7 +553,7 @@ def create_result_bulk_without_preload_content( ) -> RESTResponseType: """Bulk create test run result - This method allows to create a lot of test run result at once. If you try to send more than 2,000 results in a single bulk request, you will receive an error with code 413 - Payload Too Large. If there is no free space left in your team account, when attempting to upload an attachment, e.g., through reporters, you will receive an error with code 507 - Insufficient Storage. + This method allows to create a lot of test run result at once. If you try to send more than 200 results in a single bulk request, you will receive an error with code 413 - Payload Too Large. If there is no free space left in your team account, when attempting to upload an attachment, e.g., through reporters, you will receive an error with code 507 - Insufficient Storage. :param code: Code of project, where to search entities. (required) :type code: str diff --git a/qase-api-client/src/qase/api_client_v1/models/result_create_bulk.py b/qase-api-client/src/qase/api_client_v1/models/result_create_bulk.py index b7932370..2a8af855 100644 --- a/qase-api-client/src/qase/api_client_v1/models/result_create_bulk.py +++ b/qase-api-client/src/qase/api_client_v1/models/result_create_bulk.py @@ -29,7 +29,7 @@ class ResultCreateBulk(BaseModel): """ ResultCreateBulk """ # noqa: E501 - results: Annotated[List[ResultCreate], Field(max_length=2000)] + results: Annotated[List[ResultCreate], Field(max_length=200)] __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( diff --git a/qase-api-v2-client/docs/ResultExecution.md b/qase-api-v2-client/docs/ResultExecution.md index d06dda70..4b781d85 100644 --- a/qase-api-v2-client/docs/ResultExecution.md +++ b/qase-api-v2-client/docs/ResultExecution.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **status** | **str** | Can have the following values passed, failed, blocked, skipped, invalid + custom statuses | **duration** | **int** | Duration of the test execution in milliseconds. | [optional] **stacktrace** | **str** | | [optional] +**error_context** | **str** | Free-form failure context captured by the reporter. For Playwright this is the content of error-context.md (test info, error details, page snapshot), so it may include rendered page content. Stored verbatim so it can be copied as raw text. Values longer than 262144 characters are silently truncated by Qase and the request still succeeds. Write-only — not returned by the result read endpoints. | [optional] **thread** | **str** | | [optional] ## Example diff --git a/qase-api-v2-client/docs/ResultsApi.md b/qase-api-v2-client/docs/ResultsApi.md index 0bcc0902..be7e0e8c 100644 --- a/qase-api-v2-client/docs/ResultsApi.md +++ b/qase-api-v2-client/docs/ResultsApi.md @@ -188,6 +188,7 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**413** | Payload Too Large. Returned when the request contains more than 200 results, or when the combined length of `execution.error_context` across the batch exceeds 4194304 characters. In both cases the whole batch is rejected — no results are created. | - | **422** | Unprocessable Entity | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/qase-api-v2-client/pyproject.toml b/qase-api-v2-client/pyproject.toml index 4328cb74..3faa2c9c 100644 --- a/qase-api-v2-client/pyproject.toml +++ b/qase-api-v2-client/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-api-v2-client" -version = "2.0.7" +version = "2.0.8" description = "Qase TestOps API V2 client for Python" readme = "README.md" authors = [{name = "Qase Team", email = "support@qase.io"}] diff --git a/qase-api-v2-client/src/qase/api_client_v2/api/results_api.py b/qase-api-v2-client/src/qase/api_client_v2/api/results_api.py index db871969..51d5f0ea 100644 --- a/qase-api-v2-client/src/qase/api_client_v2/api/results_api.py +++ b/qase-api-v2-client/src/qase/api_client_v2/api/results_api.py @@ -426,6 +426,7 @@ def create_results_v2( '401': None, '403': None, '404': None, + '413': None, '422': None, } response_data = self.api_client.call_api( @@ -506,6 +507,7 @@ def create_results_v2_with_http_info( '401': None, '403': None, '404': None, + '413': None, '422': None, } response_data = self.api_client.call_api( @@ -586,6 +588,7 @@ def create_results_v2_without_preload_content( '401': None, '403': None, '404': None, + '413': None, '422': None, } response_data = self.api_client.call_api( diff --git a/qase-api-v2-client/src/qase/api_client_v2/models/result_execution.py b/qase-api-v2-client/src/qase/api_client_v2/models/result_execution.py index e1ee7db6..c48e8794 100644 --- a/qase-api-v2-client/src/qase/api_client_v2/models/result_execution.py +++ b/qase-api-v2-client/src/qase/api_client_v2/models/result_execution.py @@ -32,8 +32,9 @@ class ResultExecution(BaseModel): status: StrictStr = Field(description="Can have the following values passed, failed, blocked, skipped, invalid + custom statuses") duration: Optional[StrictInt] = Field(default=None, description="Duration of the test execution in milliseconds.") stacktrace: Optional[StrictStr] = None + error_context: Optional[StrictStr] = Field(default=None, description="Free-form failure context captured by the reporter. For Playwright this is the content of error-context.md (test info, error details, page snapshot), so it may include rendered page content. Stored verbatim so it can be copied as raw text. Values longer than 262144 characters are silently truncated by Qase and the request still succeeds. Write-only — not returned by the result read endpoints.") thread: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["start_time", "end_time", "status", "duration", "stacktrace", "thread"] + __properties: ClassVar[List[str]] = ["start_time", "end_time", "status", "duration", "stacktrace", "error_context", "thread"] model_config = ConfigDict( populate_by_name=True, @@ -94,6 +95,11 @@ def to_dict(self) -> Dict[str, Any]: if self.stacktrace is None and "stacktrace" in self.model_fields_set: _dict['stacktrace'] = None + # set to None if error_context (nullable) is None + # and model_fields_set contains the field + if self.error_context is None and "error_context" in self.model_fields_set: + _dict['error_context'] = None + # set to None if thread (nullable) is None # and model_fields_set contains the field if self.thread is None and "thread" in self.model_fields_set: @@ -116,6 +122,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "duration": obj.get("duration"), "stacktrace": obj.get("stacktrace"), + "error_context": obj.get("error_context"), "thread": obj.get("thread") }) return _obj