Skip to content

feat(restapi): migrate Katalon ModuleOrders/OrderCreate to pytest#142

Merged
Lenajava1 merged 1 commit into
devfrom
vcst-migrate-katalon-orders
Apr 17, 2026
Merged

feat(restapi): migrate Katalon ModuleOrders/OrderCreate to pytest#142
Lenajava1 merged 1 commit into
devfrom
vcst-migrate-katalon-orders

Conversation

@Lenajava1
Copy link
Copy Markdown
Collaborator

Migrates the single REAL Katalon script (OrderCreate/Script1629368773186) from vc-quality-gate-katalon into the refactored project, expanding the existing 6-test orders module to 15 tests that mirror the Katalon end-to-end lifecycle.

Endpoints (all verified from Object Repository .rs files, none guessed):
POST /api/order/customerOrders create
GET /api/order/customerOrders/{id} get by id
GET /api/order/customerOrders/number/{number} get by number
PUT /api/order/customerOrders update
PUT /api/order/customerOrders/recalculate recalculate
DELETE /api/order/customerOrders?ids= delete
POST /api/order/customerOrders/search search
POST /api/order/customerOrders/searchChanges search changes
GET /api/order/customerOrders/{id}/payments/new generate payment
GET /api/order/customerOrders/{id}/shipments/new generate shipment
GET /api/order/customerOrders/{id}/changes changes by id
GET /api/order/customerOrders/indexed/searchEnabled indexed flag
GET /api/order/dashboardStatistics stats
POST /api/order/customerOrders/{id}/processPayment/{paymentId}

Files:

  • restapi/operations/order_operations.py (new): OrderOperations class
  • restapi/operations/init.py: export OrderOperations
  • restapi/constants.py: ORDER_TEMPLATE, ORDER_LINE_ITEM_TEMPLATE
  • tests/restapi/orders/conftest.py (new): order_ops, seed_order_customer, make_order(with_item=...) factory with cleanup
  • tests/restapi/orders/test_orders.py: rewritten to use ops class + full lifecycle coverage (payments-new, shipments-new, recalculate, searchChanges delta, get-by-number, delete-then-search, 64-char limit)

Local result: 14 passed, 1 xfailed, in 27s.

The single xfail (test_order_search_changes_count_grows_after_update) is environmental: the demo backend writes Order change records asynchronously with lag exceeding the test runtime (verified empirically against pre-seeded vs freshly created orders). Endpoint contract is exercised; xfail strict=False so it XPASSes if change tracking becomes synchronous.

Migrates the single REAL Katalon script (OrderCreate/Script1629368773186)
from vc-quality-gate-katalon into the refactored project, expanding the
existing 6-test orders module to 15 tests that mirror the Katalon
end-to-end lifecycle.

Endpoints (all verified from Object Repository .rs files, none guessed):
  POST   /api/order/customerOrders                     create
  GET    /api/order/customerOrders/{id}                get by id
  GET    /api/order/customerOrders/number/{number}     get by number
  PUT    /api/order/customerOrders                     update
  PUT    /api/order/customerOrders/recalculate         recalculate
  DELETE /api/order/customerOrders?ids=                delete
  POST   /api/order/customerOrders/search              search
  POST   /api/order/customerOrders/searchChanges       search changes
  GET    /api/order/customerOrders/{id}/payments/new   generate payment
  GET    /api/order/customerOrders/{id}/shipments/new  generate shipment
  GET    /api/order/customerOrders/{id}/changes        changes by id
  GET    /api/order/customerOrders/indexed/searchEnabled  indexed flag
  GET    /api/order/dashboardStatistics                stats
  POST   /api/order/customerOrders/{id}/processPayment/{paymentId}

Files:
- restapi/operations/order_operations.py (new): OrderOperations class
- restapi/operations/__init__.py: export OrderOperations
- restapi/constants.py: ORDER_TEMPLATE, ORDER_LINE_ITEM_TEMPLATE
- tests/restapi/orders/conftest.py (new): order_ops, seed_order_customer,
  make_order(with_item=...) factory with cleanup
- tests/restapi/orders/test_orders.py: rewritten to use ops class +
  full lifecycle coverage (payments-new, shipments-new, recalculate,
  searchChanges delta, get-by-number, delete-then-search, 64-char limit)

Local result: 14 passed, 1 xfailed, in 27s.

The single xfail (test_order_search_changes_count_grows_after_update)
is environmental: the demo backend writes Order change records
asynchronously with lag exceeding the test runtime (verified empirically
against pre-seeded vs freshly created orders). Endpoint contract is
exercised; xfail strict=False so it XPASSes if change tracking becomes
synchronous.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

REST API Test Results

281 tests  +9   281 ✅ +9   23s ⏱️ -1s
  4 suites ±0     0 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 7a9c96e. ± Comparison against base commit 65956a5.

@Lenajava1 Lenajava1 merged commit e044607 into dev Apr 17, 2026
3 checks passed
@Lenajava1 Lenajava1 deleted the vcst-migrate-katalon-orders branch April 29, 2026 18:52
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.

1 participant