What
Integration tests for the automation definition CRUD reactors. Fully synchronous — no async considerations. These are the simplest automation tests and should be written first.
Depends on
#2797 (AutomationTestUtils)
Files to create
test/prerna/testing/automation/
CreateAutomationReactorTests.java
GetAutomationReactorTests.java
ListAutomationsReactorTests.java
DeleteAutomationReactorTests.java
Test cases
CreateAutomationReactorTests
testCreateAutomationSucceeds — valid name + project → returns automationId, name, createdAt
testCreateAutomationMissingNameThrows — null/empty name → error
testCreateAutomationMissingProjectThrows — null projectId → error
testCreateAutomationDuplicateNameSucceeds — same name twice in same project is allowed (names aren't unique keys)
GetAutomationReactorTests
testGetAutomationReturnsCorrectFields — create then get, verify all fields match
testGetAutomationUnknownIdThrows — random UUID → error
testGetAutomationReturnsSavedGraph — create with a graph definition, verify graph round-trips correctly
ListAutomationsReactorTests
testListAutomationsEmptyForNewProject — fresh project → empty list
testListAutomationsReturnsAllForProject — create 3, list → returns 3
testListAutomationsIsScopedToProject — create in two different projects, list each → no cross-contamination
DeleteAutomationReactorTests
testDeleteAutomationSucceeds — create then delete → subsequent get throws
testDeleteAutomationUnknownIdThrows — random UUID → error
Pattern
Extend AbstractBaseSemossApiTests. Use AutomationTestUtils for all reactor calls. Use ApiSemossTestEngineUtils.createBasicEngine() if a project/engine is needed as a prerequisite.
What
Integration tests for the automation definition CRUD reactors. Fully synchronous — no async considerations. These are the simplest automation tests and should be written first.
Depends on
#2797 (AutomationTestUtils)
Files to create
Test cases
CreateAutomationReactorTests
testCreateAutomationSucceeds— valid name + project → returns automationId, name, createdAttestCreateAutomationMissingNameThrows— null/empty name → errortestCreateAutomationMissingProjectThrows— null projectId → errortestCreateAutomationDuplicateNameSucceeds— same name twice in same project is allowed (names aren't unique keys)GetAutomationReactorTests
testGetAutomationReturnsCorrectFields— create then get, verify all fields matchtestGetAutomationUnknownIdThrows— random UUID → errortestGetAutomationReturnsSavedGraph— create with a graph definition, verify graph round-trips correctlyListAutomationsReactorTests
testListAutomationsEmptyForNewProject— fresh project → empty listtestListAutomationsReturnsAllForProject— create 3, list → returns 3testListAutomationsIsScopedToProject— create in two different projects, list each → no cross-contaminationDeleteAutomationReactorTests
testDeleteAutomationSucceeds— create then delete → subsequent get throwstestDeleteAutomationUnknownIdThrows— random UUID → errorPattern
Extend
AbstractBaseSemossApiTests. UseAutomationTestUtilsfor all reactor calls. UseApiSemossTestEngineUtils.createBasicEngine()if a project/engine is needed as a prerequisite.