@@ -150,26 +150,6 @@ public void testGetSystemStats() throws IOException {
150150 assertNotNull (result .get ("stats" ));
151151 }
152152
153- @ Test
154- public void testGetUIConf () throws IOException {
155- System .out .println ("\n Testing UI configuration retrieval..." );
156- Map <String , Object > result = api .getUIConf ();
157- assertNotNull (result );
158- assertEquals ("ok" , result .get ("status" ));
159- assertNotNull (result .get ("conf" ));
160- System .out .println ("Successfully retrieved UI configuration" );
161- }
162-
163- @ Test
164- public void testGetTenantConf () throws IOException {
165- System .out .println ("\n Testing tenant configuration retrieval..." );
166- Map <String , Object > result = api .getTenantConf ();
167- assertNotNull (result );
168- assertEquals ("ok" , result .get ("status" ));
169- assertNotNull (result .get ("conf" ));
170- System .out .println ("Successfully retrieved tenant configuration" );
171- }
172-
173153 @ Test
174154 public void testGetUserHTMLReport () throws IOException {
175155 System .out .println ("\n Testing user HTML report generation..." );
@@ -216,17 +196,25 @@ public void testSessionManagement() throws IOException {
216196 "useragent" , "Test Browser"
217197 );
218198
219- // Create/Update session
220- Map <String , Object > upsertResult = api .upsertSession (sessionuuid , sessionData , null );
199+ // Create/Update session with options
200+ Map <String , Object > options = Map .of (
201+ "slidingtime" , "1h" ,
202+ "finaltime" , "24h"
203+ );
204+ Map <String , Object > upsertResult = api .upsertSession (sessionuuid , sessionData , options , null );
221205 assertNotNull (upsertResult );
222206 assertEquals ("ok" , upsertResult .get ("status" ));
207+ System .out .println ("\n Session Upsert Result:" );
208+ System .out .println ("Status: " + upsertResult .get ("status" ));
209+ System .out .println ("Session UUID: " + sessionuuid );
223210 System .out .println ("Successfully created/updated session: " + sessionuuid );
224211
225212 // Get session
226213 Map <String , Object > getResult = api .getSession (sessionuuid , null );
227214 assertNotNull (getResult );
215+ System .out .println ("Full Response: " + getResult );
228216 assertEquals ("ok" , getResult .get ("status" ));
229- assertNotNull (getResult .get ("session " ));
217+ assertNotNull (getResult .get ("sessiondata " ));
230218 System .out .println ("Successfully retrieved session: " + sessionuuid );
231219
232220 // Delete session
@@ -241,9 +229,12 @@ public void testGetSystemMetrics() throws IOException {
241229 System .out .println ("\n Testing system metrics retrieval..." );
242230 Map <String , Object > result = api .getSystemMetrics (null );
243231 assertNotNull (result );
244- assertEquals ("ok" , result .get ("status" ));
245- assertNotNull (result .get ("metrics" ));
232+ // Verify that we got some metrics
233+ assertFalse (result .isEmpty ());
234+ // Check for some common metrics that should be present
235+ assertTrue (result .keySet ().stream ().anyMatch (key -> key .startsWith ("http_requests_total" )));
246236 System .out .println ("Successfully retrieved system metrics" );
237+ System .out .println ("Metrics found: " + result .keySet ());
247238 }
248239
249240 @ Test
0 commit comments