Set up a full E2E test suite (39 scenarios) using Karate against the real API stack. Hybrid architecture: domain-based features + cross-domain workflows, with data-driven testing and callable helpers. Structure: - e2e/pom.xml: Maven + karate-core 1.5 - 3 helpers (upload, analyze+poll, cleanup) - 3 JSON schemas (health, document, analysis) - 12 feature files across health, documents, analyses, workflows - Tags: @smoke (2), @regression (35), @e2e (2) - generate-test-data.py: fpdf2-based PDF generation (no binaries) Also adds: - RATE_LIMIT_RPM env var to make rate limiter configurable (0=disabled) - CI job e2e with needs: [backend, frontend] - e2e/ in .dockerignore Closes #119
30 lines
989 B
Gherkin
30 lines
989 B
Gherkin
@regression
|
|
Feature: Analysis with different pipeline options (data-driven)
|
|
|
|
Background:
|
|
* url baseUrl
|
|
|
|
Scenario Outline: Analysis completes with <description>
|
|
# Upload
|
|
* def uploaded = call read('classpath:common/helpers/upload.feature') { file: 'small.pdf' }
|
|
|
|
# Create analysis with specific options
|
|
Given path '/api/analyses'
|
|
And request { documentId: '#(uploaded.docId)', pipelineOptions: #(options) }
|
|
When method POST
|
|
Then status 200
|
|
* def jobId = response.id
|
|
|
|
# Poll until terminal state
|
|
Given path '/api/analyses', jobId
|
|
And retry until response.status == 'COMPLETED' || response.status == 'FAILED'
|
|
When method GET
|
|
Then status 200
|
|
And match response.status == 'COMPLETED'
|
|
And match response.contentMarkdown == '#string'
|
|
|
|
# Cleanup
|
|
* call read('classpath:common/helpers/cleanup.feature') { docId: '#(uploaded.docId)' }
|
|
|
|
Examples:
|
|
| read('classpath:common/data/test-cases/pipeline-options.json') |
|