TestForge AI Execution Report

Generated 2026-05-13T07:36:48.870257Z  |  Duration 565ms

Total
34
Passed
28
Failed
6
Pass Rate
82.4%

Test Cases

Create payment with all required fieldsHAPPY_PATH314ms8/8

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 100.0,
  "currency" : "USD"
}

Response (HTTP 201, 291ms)

{
  "id" : "pay_41238087a19a",
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 100.0,
  "currency" : "USD",
  "status" : "COMPLETED",
  "createdAt" : "2026-05-13T07:36:48.523964Z",
  "updatedAt" : "2026-05-13T07:36:48.523964Z"
}

Assertions (8/8 passed)

FieldExpectedActualStatus
idnon-nullpay_41238087a19a
merchantIdmerchant-001merchant-001
customerIdcustomer-abccustomer-abc
amount100.0100.0
currencyUSDUSD
statusCOMPLETEDCOMPLETED
createdAtnon-null2026-05-13T07:36:48.523964Z
updatedAtnon-null2026-05-13T07:36:48.523964Z
Create payment with all fields including optional descriptionHAPPY_PATH5ms9/9

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 128.5,
  "currency" : "CNY",
  "description" : "Order #ORD-20260430-001"
}

Response (HTTP 201, 3ms)

{
  "id" : "pay_84dca0a4e8cb",
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 128.5,
  "currency" : "CNY",
  "status" : "COMPLETED",
  "description" : "Order #ORD-20260430-001",
  "createdAt" : "2026-05-13T07:36:48.567792Z",
  "updatedAt" : "2026-05-13T07:36:48.567792Z"
}

Assertions (9/9 passed)

FieldExpectedActualStatus
idnon-nullpay_84dca0a4e8cb
merchantIdmerchant-001merchant-001
customerIdcustomer-abccustomer-abc
amount128.5128.5
currencyCNYCNY
statusCOMPLETEDCOMPLETED
descriptionOrder #ORD-20260430-001Order #ORD-20260430-001
createdAtnon-null2026-05-13T07:36:48.567792Z
updatedAtnon-null2026-05-13T07:36:48.567792Z
Create payment with minimum valid amountBOUNDARY4ms5/5

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 0.01,
  "currency" : "USD"
}

Response (HTTP 201, 3ms)

{
  "id" : "pay_790dd7840287",
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 0.01,
  "currency" : "USD",
  "status" : "COMPLETED",
  "createdAt" : "2026-05-13T07:36:48.571750Z",
  "updatedAt" : "2026-05-13T07:36:48.571750Z"
}

Assertions (5/5 passed)

FieldExpectedActualStatus
idnon-nullpay_790dd7840287
amount0.010.01
statusCOMPLETEDCOMPLETED
createdAtnon-null2026-05-13T07:36:48.571750Z
updatedAtnon-null2026-05-13T07:36:48.571750Z
Create payment with maximum valid amountBOUNDARY3ms5/5

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 999999.99,
  "currency" : "USD"
}

Response (HTTP 201, 3ms)

{
  "id" : "pay_9da816a1bf49",
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 999999.99,
  "currency" : "USD",
  "status" : "COMPLETED",
  "createdAt" : "2026-05-13T07:36:48.575328Z",
  "updatedAt" : "2026-05-13T07:36:48.575328Z"
}

Assertions (5/5 passed)

FieldExpectedActualStatus
idnon-nullpay_9da816a1bf49
amount999999.99999999.99
statusCOMPLETEDCOMPLETED
createdAtnon-null2026-05-13T07:36:48.575328Z
updatedAtnon-null2026-05-13T07:36:48.575328Z
Create payment with amount below minimum (0.00)NEGATIVE83ms2/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 0.0,
  "currency" : "USD"
}

Response (HTTP 400, 82ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "amount",
    "message" : "必须大于或等于0.01"
  } ],
  "timestamp" : "2026-05-13T07:36:48.652910Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment with amount exceeding maximumNEGATIVE6ms2/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 1000000.0,
  "currency" : "USD"
}

Response (HTTP 400, 6ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "amount",
    "message" : "数字的值超出了允许范围(只允许在6位整数和2位小数范围内)"
  }, {
    "field" : "amount",
    "message" : "必须小于或等于999999.99"
  } ],
  "timestamp" : "2026-05-13T07:36:48.665478Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment with invalid currency formatNEGATIVE5ms2/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 100.0,
  "currency" : "us"
}

Response (HTTP 400, 4ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "currency",
    "message" : "must be a 3-letter ISO 4217 currency code"
  } ],
  "timestamp" : "2026-05-13T07:36:48.670388Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment missing required field 'amount'NEGATIVE6ms2/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "currency" : "USD"
}

Response (HTTP 400, 4ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "amount",
    "message" : "不能为null"
  } ],
  "timestamp" : "2026-05-13T07:36:48.675827Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment missing required field 'currency'NEGATIVE6ms2/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 100.0
}

Response (HTTP 400, 5ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "currency",
    "message" : "不能为空"
  } ],
  "timestamp" : "2026-05-13T07:36:48.681590Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment missing required field 'merchantId'NEGATIVE5ms2/2

Request

POST /api/payments

{
  "customerId" : "customer-abc",
  "amount" : 100.0,
  "currency" : "USD"
}

Response (HTTP 400, 4ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "merchantId",
    "message" : "不能为空"
  } ],
  "timestamp" : "2026-05-13T07:36:48.686895Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment missing required field 'customerId'NEGATIVE5ms2/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "amount" : 100.0,
  "currency" : "USD"
}

Response (HTTP 400, 5ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "customerId",
    "message" : "不能为空"
  } ],
  "timestamp" : "2026-05-13T07:36:48.692034Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment with amount as string instead of numberNEGATIVE27ms1/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : "one-hundred",
  "currency" : "USD"
}

Response (HTTP 400, 26ms)

{
  "timestamp" : "2026-05-13T07:36:48.714+00:00",
  "status" : 400,
  "error" : "Bad Request",
  "path" : "/api/payments"
}

Assertions (1/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORnull
🤖 AI Analysis — TEST LOGIC ERROR HIGH confidence
Root Cause: The test has expected_status of 0 (likely unset/default) instead of 400, and asserts a 'code' field that the API does not return in its Spring-default error response for type-mismatch deserialization errors.
Evidence: actual_status is 400 which is correct behavior; the response body is a Spring Boot default error envelope (lacking 'code'), and expected_status is 0 indicating the test was never given a proper expected status; assertion failure is only 'field code: field absent'
Suggested Fix: Set expected_status to 400; either remove the assertion on 'code' (since Spring's default deserialization-failure response does not include it) or update the API to return a consistent error envelope with 'code' for all 400 responses including type-mismatch deserialization failures.
Create payment with merchantId exceeding maxLengthBOUNDARY6ms2/2

Request

POST /api/payments

{
  "merchantId" : "m123456789012345678901234567890123456789012345678901234567890abcde",
  "customerId" : "customer-abc",
  "amount" : 100.0,
  "currency" : "USD"
}

Response (HTTP 400, 4ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "merchantId",
    "message" : "个数必须在0和64之间"
  } ],
  "timestamp" : "2026-05-13T07:36:48.724575Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment with description at maxLength boundaryBOUNDARY6ms0/4

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 100.0,
  "currency" : "USD",
  "description" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}

Response (HTTP 400, 5ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "description",
    "message" : "个数必须在0和255之间"
  } ],
  "timestamp" : "2026-05-13T07:36:48.730698Z"
}

Assertions (0/4 passed)

FieldExpectedActualStatus
idnon-nullnull
statusCOMPLETED400
createdAtnon-nullnull
updatedAtnon-nullnull
🤖 AI Analysis — TEST LOGIC ERROR HIGH confidence
Root Cause: The description string sent is 256 characters (one over the 255-char maximum), so the API correctly rejects it with 400, but the test expected a 201/success response with id, createdAt, updatedAt, and a String status field.
Evidence: The description field in the request body is 256 'A' characters; the API responded with VALIDATION_ERROR '个数必须在0和255之间' on field 'description'; the test asserts success fields (id, createdAt, updatedAt) and expected_status is 0 (unset), confirming the test expected success
Suggested Fix: Trim the description to exactly 255 characters to hit the valid boundary; additionally set expected_status to 201 (or the correct success code) and assert on success-response fields, not on the error-response shape.
Create payment with negative amountNEGATIVE5ms2/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : -50.0,
  "currency" : "USD"
}

Response (HTTP 400, 5ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "amount",
    "message" : "必须大于或等于0.01"
  } ],
  "timestamp" : "2026-05-13T07:36:48.736350Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment with numeric currency codeNEGATIVE5ms2/2

Request

POST /api/payments

{
  "merchantId" : "merchant-001",
  "customerId" : "customer-abc",
  "amount" : 100.0,
  "currency" : "840"
}

Response (HTTP 400, 3ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "currency",
    "message" : "must be a 3-letter ISO 4217 currency code"
  } ],
  "timestamp" : "2026-05-13T07:36:48.740878Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Create payment with empty request bodyNEGATIVE5ms2/2

Request

POST /api/payments

{ }

Response (HTTP 400, 4ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "amount",
    "message" : "不能为null"
  }, {
    "field" : "currency",
    "message" : "不能为空"
  }, {
    "field" : "customerId",
    "message" : "不能为空"
  }, {
    "field" : "merchantId",
    "message" : "不能为空"
  } ],
  "timestamp" : "2026-05-13T07:36:48.745979Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
status400400
codeVALIDATION_ERRORVALIDATION_ERROR
Get existing payment by IDHAPPY_PATH5ms8/8

Request

GET /api/payments/pay_5e57c904619b

Response (HTTP 200, 4ms)

{
  "id" : "pay_5e57c904619b",
  "merchantId" : "setup-merchant",
  "customerId" : "setup-customer",
  "amount" : 100.0,
  "currency" : "USD",
  "status" : "COMPLETED",
  "createdAt" : "2026-05-13T07:36:48.751690Z",
  "updatedAt" : "2026-05-13T07:36:48.751690Z"
}

Assertions (8/8 passed)

FieldExpectedActualStatus
createdAtnon-null2026-05-13T07:36:48.751690Z
amountnon-null100.0
merchantIdnon-nullsetup-merchant
customerIdnon-nullsetup-customer
currencynon-nullUSD
idnon-nullpay_5e57c904619b
statusCOMPLETEDCOMPLETED
updatedAtnon-null2026-05-13T07:36:48.751690Z
Get payment with non-existent ID returns 404NEGATIVE5ms1/1

Request

GET /api/payments/non-existent-id

Response (HTTP 404, 4ms)

{
  "status" : 404,
  "code" : "PAYMENT_NOT_FOUND",
  "message" : "Payment not found: non-existent-id",
  "timestamp" : "2026-05-13T07:36:48.762403Z"
}

Assertions (1/1 passed)

FieldExpectedActualStatus
timestampnon-null2026-05-13T07:36:48.762403Z
Response body contains all defined fields for existing paymentHAPPY_PATH3ms8/9

Request

GET /api/payments/pay_30adbb18bfba

Response (HTTP 200, 2ms)

{
  "id" : "pay_30adbb18bfba",
  "merchantId" : "setup-merchant",
  "customerId" : "setup-customer",
  "amount" : 100.0,
  "currency" : "USD",
  "status" : "COMPLETED",
  "createdAt" : "2026-05-13T07:36:48.766558Z",
  "updatedAt" : "2026-05-13T07:36:48.766558Z"
}

Assertions (8/9 passed)

FieldExpectedActualStatus
createdAtnon-null2026-05-13T07:36:48.766558Z
amountnon-null100.0
merchantIdnon-nullsetup-merchant
customerIdnon-nullsetup-customer
descriptionnon-nullnull
currencynon-nullUSD
idnon-nullpay_30adbb18bfba
statusCOMPLETEDCOMPLETED
updatedAtnon-null2026-05-13T07:36:48.766558Z
🤖 AI Analysis — ASSERTION TOO STRICT HIGH confidence
Root Cause: The test asserts that 'description' must be present in the response, but the API omits optional fields that were never set on this payment record.
Evidence: The actual response contains all core fields (id, merchantId, customerId, amount, currency, status, createdAt, updatedAt) and returns HTTP 200; the only assertion failure is 'field description: field absent', indicating description was never stored for this seeded record
Suggested Fix: Either make the 'description' assertion conditional/optional (only assert when the field is expected to be non-null), or update the test setup data to create the payment with a description value so the field is present in the response.
Get payment with empty string ID returns 404BOUNDARY3ms1/1

Request

GET /api/payments/does-not-exist

Response (HTTP 404, 3ms)

{
  "status" : 404,
  "code" : "PAYMENT_NOT_FOUND",
  "message" : "Payment not found: does-not-exist",
  "timestamp" : "2026-05-13T07:36:48.772201Z"
}

Assertions (1/1 passed)

FieldExpectedActualStatus
timestampnon-null2026-05-13T07:36:48.772201Z
refundReason field absent for COMPLETED paymentHAPPY_PATH3ms4/4

Request

GET /api/payments/pay_9ed6913def1c

Response (HTTP 200, 2ms)

{
  "id" : "pay_9ed6913def1c",
  "merchantId" : "setup-merchant",
  "customerId" : "setup-customer",
  "amount" : 100.0,
  "currency" : "USD",
  "status" : "COMPLETED",
  "createdAt" : "2026-05-13T07:36:48.775674Z",
  "updatedAt" : "2026-05-13T07:36:48.775674Z"
}

Assertions (4/4 passed)

FieldExpectedActualStatus
createdAtnon-null2026-05-13T07:36:48.775674Z
idnon-nullpay_9ed6913def1c
statusCOMPLETEDCOMPLETED
updatedAtnon-null2026-05-13T07:36:48.775674Z
Full refund omitting amount (full payment amount refunded)HAPPY_PATH9ms5/5

Request

POST /api/payments/pay_f8ba911e19b3/refund

{
  "reason" : "Customer requested cancellation"
}

Response (HTTP 200, 7ms)

{
  "id" : "pay_f8ba911e19b3",
  "merchantId" : "setup-merchant",
  "customerId" : "setup-customer",
  "amount" : 100.0,
  "currency" : "USD",
  "status" : "REFUNDED",
  "refundReason" : "Customer requested cancellation",
  "createdAt" : "2026-05-13T07:36:48.782441Z",
  "updatedAt" : "2026-05-13T07:36:48.790935Z"
}

Assertions (5/5 passed)

FieldExpectedActualStatus
createdAtnon-null2026-05-13T07:36:48.782441Z
refundReasonCustomer requested cancellationCustomer requested cancellation
idnon-nullpay_f8ba911e19b3
statusREFUNDEDREFUNDED
updatedAtnon-null2026-05-13T07:36:48.790935Z
Partial refund with amount less than payment amountHAPPY_PATH3ms5/5

Request

POST /api/payments/pay_38c00e902331/refund

{
  "reason" : "Partial cancellation requested",
  "amount" : 10.0
}

Response (HTTP 200, 3ms)

{
  "id" : "pay_38c00e902331",
  "merchantId" : "setup-merchant",
  "customerId" : "setup-customer",
  "amount" : 100.0,
  "currency" : "USD",
  "status" : "PARTIALLY_REFUNDED",
  "refundReason" : "Partial cancellation requested",
  "createdAt" : "2026-05-13T07:36:48.794695Z",
  "updatedAt" : "2026-05-13T07:36:48.798610Z"
}

Assertions (5/5 passed)

FieldExpectedActualStatus
createdAtnon-null2026-05-13T07:36:48.794695Z
refundReasonPartial cancellation requestedPartial cancellation requested
idnon-nullpay_38c00e902331
statusPARTIALLY_REFUNDEDPARTIALLY_REFUNDED
updatedAtnon-null2026-05-13T07:36:48.798610Z
Refund on already-REFUNDED payment returns 422NEGATIVE3ms0/3

Request

POST /api/payments/pay_0fbb9157f12e/refund

{
  "reason" : "Attempting duplicate refund"
}

Response (HTTP 200, 3ms)

{
  "id" : "pay_0fbb9157f12e",
  "merchantId" : "setup-merchant",
  "customerId" : "setup-customer",
  "amount" : 100.0,
  "currency" : "USD",
  "status" : "REFUNDED",
  "refundReason" : "Attempting duplicate refund",
  "createdAt" : "2026-05-13T07:36:48.802123Z",
  "updatedAt" : "2026-05-13T07:36:48.805491Z"
}

Assertions (0/3 passed)

FieldExpectedActualStatus
codenon-nullnull
messagenon-nullnull
status400REFUNDED
🤖 AI Analysis — ASSERTION TOO STRICT HIGH confidence
Root Cause: The test asserts that 'description' must be present in the response, but the API omits optional fields that were never set on this payment record.
Evidence: The actual response contains all core fields (id, merchantId, customerId, amount, currency, status, createdAt, updatedAt) and returns HTTP 200; the only assertion failure is 'field description: field absent', indicating description was never stored for this seeded record
Suggested Fix: Either make the 'description' assertion conditional/optional (only assert when the field is expected to be non-null), or update the test setup data to create the payment with a description value so the field is present in the response.
Refund with non-existent payment ID returns 404NEGATIVE4ms2/2

Request

POST /api/payments/non-existent-id/refund

{
  "reason" : "Customer requested cancellation"
}

Response (HTTP 404, 3ms)

{
  "status" : 404,
  "code" : "PAYMENT_NOT_FOUND",
  "message" : "Payment not found: non-existent-id",
  "timestamp" : "2026-05-13T07:36:48.808860Z"
}

Assertions (2/2 passed)

FieldExpectedActualStatus
codenon-nullPAYMENT_NOT_FOUND
messagenon-nullPayment not found: non-existent-id
Missing required reason field returns 400NEGATIVE3ms3/3

Request

POST /api/payments/pay_002d9dfc4539/refund

{
  "amount" : 10.0
}

Response (HTTP 400, 3ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "reason",
    "message" : "不能为空"
  } ],
  "timestamp" : "2026-05-13T07:36:48.816710Z"
}

Assertions (3/3 passed)

FieldExpectedActualStatus
codeVALIDATION_ERRORVALIDATION_ERROR
messagenon-nullRequest validation failed
status400400
Amount at minimum boundary (0.01) is acceptedBOUNDARY3ms5/5

Request

POST /api/payments/pay_4a97db5d5bda/refund

{
  "reason" : "Minimum refund test",
  "amount" : 0.01
}

Response (HTTP 200, 3ms)

{
  "id" : "pay_4a97db5d5bda",
  "merchantId" : "setup-merchant",
  "customerId" : "setup-customer",
  "amount" : 100.0,
  "currency" : "USD",
  "status" : "PARTIALLY_REFUNDED",
  "refundReason" : "Minimum refund test",
  "createdAt" : "2026-05-13T07:36:48.819700Z",
  "updatedAt" : "2026-05-13T07:36:48.822834Z"
}

Assertions (5/5 passed)

FieldExpectedActualStatus
createdAtnon-null2026-05-13T07:36:48.819700Z
refundReasonMinimum refund testMinimum refund test
idnon-nullpay_4a97db5d5bda
statusPARTIALLY_REFUNDEDPARTIALLY_REFUNDED
updatedAtnon-null2026-05-13T07:36:48.822834Z
Amount below minimum (0.00) returns 400BOUNDARY4ms4/4

Request

POST /api/payments/pay_f8b4842bdfdb/refund

{
  "reason" : "Zero amount refund attempt",
  "amount" : 0.0
}

Response (HTTP 400, 4ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "amount",
    "message" : "必须大于或等于0.01"
  } ],
  "timestamp" : "2026-05-13T07:36:48.830232Z"
}

Assertions (4/4 passed)

FieldExpectedActualStatus
codeVALIDATION_ERRORVALIDATION_ERROR
messagenon-nullRequest validation failed
errorsnon-null[{field=amount, message=必须大于或等于0.01}]
status400400
Negative amount returns 400BOUNDARY4ms3/3

Request

POST /api/payments/pay_c014aa1239b8/refund

{
  "reason" : "Negative amount test",
  "amount" : -50.0
}

Response (HTTP 400, 4ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "amount",
    "message" : "必须大于或等于0.01"
  } ],
  "timestamp" : "2026-05-13T07:36:48.837390Z"
}

Assertions (3/3 passed)

FieldExpectedActualStatus
codeVALIDATION_ERRORVALIDATION_ERROR
messagenon-nullRequest validation failed
status400400
Reason field at maximum length (255 chars) is acceptedBOUNDARY4ms0/5

Request

POST /api/payments/pay_cc9e457dacab/refund

{
  "reason" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
  "amount" : 10.0
}

Response (HTTP 400, 3ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "reason",
    "message" : "个数必须在0和255之间"
  } ],
  "timestamp" : "2026-05-13T07:36:48.843855Z"
}

Assertions (0/5 passed)

FieldExpectedActualStatus
createdAtnon-nullnull
refundReasonnon-nullnull
idnon-nullnull
statusPARTIALLY_REFUNDED400
updatedAtnon-nullnull
🤖 AI Analysis — TEST LOGIC ERROR HIGH confidence
Root Cause: The reason string sent is 257 characters (one over the 255-char limit), so the API correctly rejects it, but the test expected a successful refund response.
Evidence: The reason field in the request body is 257 'A' characters; the API responded with VALIDATION_ERROR '个数必须在0和255之间' on field 'reason'; the test asserts success-response fields (id, refundReason, createdAt, updatedAt) confirming it expected acceptance
Suggested Fix: Trim the reason to exactly 255 characters to correctly test the maximum-length boundary; set expected_status to the appropriate 2xx success code and assert on the success-response fields.
Reason field exceeding maximum length (256 chars) returns 400BOUNDARY5ms3/3

Request

POST /api/payments/pay_f5bb137d9139/refund

{
  "reason" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
  "amount" : 10.0
}

Response (HTTP 400, 4ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "reason",
    "message" : "个数必须在0和255之间"
  } ],
  "timestamp" : "2026-05-13T07:36:48.851759Z"
}

Assertions (3/3 passed)

FieldExpectedActualStatus
codeVALIDATION_ERRORVALIDATION_ERROR
messagenon-nullRequest validation failed
status400400
Wrong type for amount field (string) returns 400NEGATIVE4ms1/3

Request

POST /api/payments/pay_13307d6c4c1a/refund

{
  "reason" : "Wrong type for amount",
  "amount" : "fifty"
}

Response (HTTP 400, 4ms)

{
  "timestamp" : "2026-05-13T07:36:48.859+00:00",
  "status" : 400,
  "error" : "Bad Request",
  "path" : "/api/payments/pay_13307d6c4c1a/refund"
}

Assertions (1/3 passed)

FieldExpectedActualStatus
codeVALIDATION_ERRORnull
messagenon-nullnull
status400400
🤖 AI Analysis — TEST LOGIC ERROR HIGH confidence
Root Cause: The test correctly expects a 400 response but asserts on 'code' and 'message' fields that are absent in Spring Boot's default deserialization-failure error envelope.
Evidence: The API returned 400 with Spring's default error body {timestamp, status, error, path} (no 'code' or 'message'), matching the same pattern as tc-012; expected_status is 0 (unset) and the only failures are 'code: field absent' and 'message: field absent'
Suggested Fix: Set expected_status to 400; either remove assertions on 'code' and 'message' for this error path, or update the API's exception handler to produce a consistent error envelope (including 'code' and 'message') for all type-mismatch deserialization errors, consistent with the VALIDATION_ERROR format used elsewhere.
Empty reason string returns 400NEGATIVE4ms3/3

Request

POST /api/payments/pay_a88b6a8baed8/refund

{
  "reason" : "",
  "amount" : 10.0
}

Response (HTTP 400, 3ms)

{
  "status" : 400,
  "code" : "VALIDATION_ERROR",
  "message" : "Request validation failed",
  "errors" : [ {
    "field" : "reason",
    "message" : "不能为空"
  } ],
  "timestamp" : "2026-05-13T07:36:48.866183Z"
}

Assertions (3/3 passed)

FieldExpectedActualStatus
codeVALIDATION_ERRORVALIDATION_ERROR
messagenon-nullRequest validation failed
status400400