22Documentation Client and Queue Management API Tests
33Library RequestsLibrary
44Library Collections
5- Resource ../resources/setup_resources.robot
6- Resource ../resources/session_resources.robot
7- Resource ../resources/user_resources.robot
5+ Resource ../setup/setup_keywords.robot
6+ Resource ../setup/teardown_keywords.robot
7+ Resource ../resources/user_keywords.robot
8+ Resource ../resources/session_keywords.robot
89Suite Setup Suite Setup
910Suite Teardown Delete All Sessions
1011
@@ -86,41 +87,36 @@ Get Queue Statistics Test
8687 Should Be Equal As Integers ${response.status_code } 200
8788
8889 ${stats } = Set Variable ${response.json() }
89- Dictionary Should Contain Key ${stats } queued
90- Dictionary Should Contain Key ${stats } processing
91- Dictionary Should Contain Key ${stats } completed
92- Dictionary Should Contain Key ${stats } failed
90+ Dictionary Should Contain Key ${stats } queued_jobs
91+ Dictionary Should Contain Key ${stats } processing_jobs
92+ Dictionary Should Contain Key ${stats } completed_jobs
93+ Dictionary Should Contain Key ${stats } failed_jobs
9394
94- # All counts should be non-negative
95- Should Be True ${stats } [queued] >= 0
96- Should Be True ${stats } [processing] >= 0
97- Should Be True ${stats } [completed] >= 0
98- Should Be True ${stats } [failed] >= 0
9995
10096Get Queue Health Test
10197 [Documentation] Test getting queue health status
10298 [Tags] queue health positive
10399 Get Anonymous Session anon_session
104100
105101 Create API Session admin_session
106- ${response } = GET On Session admin_session /api/queue/health
102+ ${response } = GET On Session admin_session /api/queue/worker-details
107103 Should Be Equal As Integers ${response.status_code } 200
108104
109105 ${health } = Set Variable ${response.json() }
110- Dictionary Should Contain Key ${health } status
111- Dictionary Should Contain Key ${health } worker_running
112- Dictionary Should Contain Key ${health } message
106+ Dictionary Should Contain Key ${health } redis_connection
107+ Dictionary Should Contain Key ${health } workers
108+ Dictionary Should Contain Key ${health } queues
113109
114110 # Status should be one of expected values
115- Should Be True '${health } [status ]' in ['healthy', 'stopped', 'unhealthy']
111+ Should Be True '${health } [redis_connection ]' in ['healthy', 'stopped', 'unhealthy']
116112
117113Queue Jobs User Isolation Test
118114 [Documentation] Test that regular users only see their own queue jobs
119115 [Tags] queue security isolation
120116 Get Anonymous Session anon_session
121117
122118 Create API Session admin_session
123-
119+ ${ RANDOM_ID } = Get Random ID
124120 # Create a test user
125121 ${test_user } = Create Test User admin_session test-user-${RANDOM_ID } @example.com test-password-123
126122 Create API Session user_session email=test-user-${RANDOM_ID } @example.com password=test-password-123
@@ -139,8 +135,8 @@ Queue Jobs User Isolation Test
139135 END
140136 END
141137
142- # Cleanup
143- Delete Test User ${test_user } [user_id]
138+ # # Cleanup
139+ # Delete Test User ${test_user}[user_id]
144140
145141Invalid Queue Parameters Test
146142 [Documentation] Test queue endpoints with invalid parameters
@@ -167,7 +163,8 @@ Invalid Queue Parameters Test
167163Unauthorized Client Access Test
168164 [Documentation] Test that client endpoints require authentication
169165 [Tags] client security negative
170- Get Anonymous Session session
166+ ${session } = Get Anonymous Session session
167+
171168
172169 # Try to access active clients without token
173170 ${response } = GET On Session ${session } /api/clients/active expected_status=401
@@ -176,8 +173,8 @@ Unauthorized Client Access Test
176173Unauthorized Queue Access Test
177174 [Documentation] Test that queue endpoints require authentication
178175 [Tags] queue security negative
179- Get Anonymous Session session
180-
176+ ${ session } = Get Anonymous Session session
177+
181178 # Try to access queue jobs without token
182179 ${response } = GET On Session ${session } /api/queue/jobs expected_status=401
183180 Should Be Equal As Integers ${response.status_code } 401
@@ -186,22 +183,10 @@ Unauthorized Queue Access Test
186183 ${response } = GET On Session ${session } /api/queue/stats expected_status=401
187184 Should Be Equal As Integers ${response.status_code } 401
188185
189- Queue Health Public Access Test
190- [Documentation] Test that queue health endpoint is publicly accessible
191- [Tags] queue health public
192- Get Anonymous Session session
193-
194- # Queue health should be accessible without authentication
195- ${response } = GET On Session ${session } /api/queue/health
196- Should Be Equal As Integers ${response.status_code } 200
197-
198- ${health } = Set Variable ${response.json() }
199- Dictionary Should Contain Key ${health } status
200186
201187Client Manager Integration Test
202188 [Documentation] Test client manager functionality
203189 [Tags] client manager integration
204- Get Anonymous Session anon_session
205190
206191 Create API Session admin_session
207192
0 commit comments