Distributed Systems Coursework
Server API Integration Test Runner
Your Server
Database Clear Path
Test Server ID
http://distsysacwserver.net.dcs.hull.ac.uk/
Run Server Tests
Export JSON
Missing the Clear command?
0%
0
Tests
0
Passed
0
Failed
Visual Studio Tunnel Setup
1
Click the
arrow
next to the Play button and select
Dev Tunnels
>
Create A Tunnel...
2
Ensure
Access
is set to
Public
and
Persistent
is selected for a static URL.
3
Run your server
in Visual Studio (Press F5). Your project must be running for the tunnel to forward tests to your local machine.
4
Copy
the URL from the browser (e.g.
ukw.devtunnels.ms
) and paste it into this dashboard.
Got it!
Database Reset Utility
Automated tests require a clean database state to run reliably. Add this utility to your server to enable the dashboard's reset feature.
1
Update Database Access:
In
UserDatabaseAccess.cs
, add this method to handle the reset logic:
public static void ClearDatabase(UserContext context)
{
context.Users.RemoveRange(context.Users);
context.SaveChanges();
}
2
Expose Endpoint:
Create a new file
Controllers/OtherController.cs
(or add to an existing one) to allow the runner to trigger the reset:
[HttpGet("Clear")]
public string Clear()
{
UserDatabaseAccess.ClearDatabase(_context);
return "true";
}
Setup Complete