WebAudioEvaluationTool icon indicating copy to clipboard operation
WebAudioEvaluationTool copied to clipboard

Add quick test for server functionality

Open giuliomoro opened this issue 8 years ago • 6 comments

Currently in order to check that your server works fine,that php is running and that it has permissions to store files, you need to go through the whole test. This can be quite time consuming if you are trying to tweak the server settings to make it work. Would it be possible to have a quick link to "test your server" which just tries to write a file to the server? Optionally, you could configure file size ( or file size AND number of files) to test how much allocated space you are allowed to write to. Finally, a "clean your test files" button would remove the test files.

giuliomoro avatar Sep 11 '17 15:09 giuliomoro

There is quite a bit of danger involved in all of these statements.

A blind config test would possibly be OK, to simply test the client-server model.

However getting it to write a bunch of files, could easily be used to write gigabytes of garbage to servers (plus more) until it is full under your username and people come shout at you.

Secondly, clean your test files may be OK, but I'd rather not have it physically write a bunch of files.

nickjillings avatar Sep 11 '17 15:09 nickjillings

good one. Then just make it write a file (perhaps with a URL to download it / view it to manually check it works ok, however it should then also check that it does not exist beforehand (e.g.: if someone had the test file on their local computer and copied it over to the server)).

giuliomoro avatar Sep 11 '17 15:09 giuliomoro

Yep, I'm going to get it to do a quick unit test of the entire PHP chain.

Features be coming...

nickjillings avatar Sep 11 '17 15:09 nickjillings

Starting in b117007, there is now a client-side testing page at php\test.html to test the server side functions.

This works for both PHP and Python servers when running

An example can be seen at http://dmtlab.bcu.ac.uk/nickjillings/waet/php/test.html

nickjillings avatar Sep 11 '17 16:09 nickjillings

Are there any more test we need to add to this?

nickjillings avatar Oct 31 '17 11:10 nickjillings

looks good to me. Just two minor things:

  • it's a .html file inside the php folder, which does not look very clean
  • the test word is a bit abused in file names, so test.html is not very expressive. Maybe consider renaming it to test_server_capabilities.php or something like that?

giuliomoro avatar Jan 19 '18 17:01 giuliomoro