3.3 Checking Development Tests
The purpose of this section is to go back over all the tests performed in each cycle of development and ensure that the project still passes the tests.
However, there is one new addition since the development tests: the addition of automated tests which allow for some of the tests to be done by the code itself so as to be able to test the majority of the key functions individually without having to call the functions in an isolated state. These tests are written on a module by module basis and do not cover the entire code base - such as the server module which is too complicated to automate tests for without building the module around the tests in the first place - therefore I have added a "type of test" section which specifies whether or not the tests are automated with a test program or done manually by myself.
Cycle 1
Run the webportal on localhost.
Webportal launches and some text is displayed.
As expected, although contains additional features than just text.
Deploy the web-portal by git pushing to Github.
Vercel should automatically detect the changes and deploy the new version.
As expected
Run the node program
Output some kind of welcome message.
As expected, then proceeds to run the rest of the node software.
Download the node program by clicking the download button on the website.
The Node program should be downloaded to the test computer
As expected
Cycle 2
Run "v --version" in the terminal.
Output of "V" then some version number and a hash of that update.
"V 0.3.1 5c716af"
Run "yarn start" in the node package's source folder.
The node software to be compiled and ran.
As expected
Run "yarn build" in the node package's source folder.
The node software to be compiled, zipped and put into the webportal's public folder.
As expected
Same as test 2.
Node software outputs a welcome message.
As expected
Same as test 2.
Node's web api should launch leading to "http://localhost:8000" displaying a welcome message.
As expected
Navigate to "https://monochain.network/download"
Be shown download instructions.
As expected
Download and unzip the node software.
Should download and unzip to an executable file.
As expected
Run the downloaded node software on an arm based macOS device.
Should run as tested in test 4 and 5.
As expected
Cycle 3
Create a new configuration file using "create_configuration()"
Outputs a log to the console confirming the operation is commencing and a config file should be generated.
As Expected
Load the new config file using "load_config()"
Config file should be loaded and returned.
As Expected
Load the new config file using "get_config()"
Config file should be loaded and returned.
As Expected
[Additional Test] Save and then load a configuration.
The data saved and then loaded back in should be exactly the same.
As Expected
Cycle 4
Compile for Windows from a MacOS device.
Node program to compile and execute normally.
Failed, required a version of some header files that is not available for macOS ARM (my laptop)
Compile for Linux from a MacOS device.
Node program to compile and execute normally.
Failed with various header errors and indetifier errors
Run the Windows version on a non-windows system.
Computer running incorrect program should report some kind of error and close the program.
Does as expected
Cycle 5
Generate a key pair.
Keys to be generated and validated successfully without crashing.
As Expected
Sign some random input data.
A signature to be generated without crashing.
As Expected
Sign then validate some random input data.
A signature to be generated then validated successfully.
As Expected
Cycle 6
Send a ping request to "http://nano:8000"
The requester to successfully complete the ping request.
This had to be completed as a handshake event rather than a ping event but still worked as a proof of connection.
Receive a ping request as "http://nano:8000"
The receiver to successfully receive and process the request.
Same as above
Cycle 7
Navigate throughout the website on a desktop/laptop device
The website to stay "intact" with no components becomming hidden or breaking.
As Expected
Navigate throughout the website on a phone/small device
The website to stay "intact" with no components becomming hidden or breaking.
All works except for a small section on the download page which goes off the page.
Open the site on desktop device.
The desktop styled navigation bar should appear along the top of the screen.
As Expected
Open the site on mobile device.
The mobile styled navigation bar should appear with a menu button to open and close the bulk of the contents.
As Expected
Cycle 8
Generate a key pair.
The program not to exit, which will happen if the key pair cannot be generated.
As Expected
Generate a key pair and sign some data.
The program not to exit, which will happen if the key pair cannot be generated or sign the data.
As Expected
Generate a key pair, sign and then verify some data.
The program not to exit and to verify that the message matches the signature.
As Expected
Cycle 9
There were no tests for this cycle and hence nothing to check.
Cycle 10
Completing a correct and valid handshake using a time object as the message.
A series of console logs on both nodes confirming that the handshake was successful.
As Expected
Completing an invalid handshake using the string "invalid data" as the message.
For both nodes to record the handshake as unsuccessful and log such to the console.
As Expected
Cycle 11
The way in which references were stored and used was completely refactored in cycle 11 and as such the code that was tested in this cycle no longer exists or is distributed in seperate parts of the project, however the new references are still tested in the tests for cycle 13 below.
Cycle 12
Navigate to 'https://localhost:8000/dashboard'
The dashboard page should redirect to the login page with an option to input a token or generate one.
As Expected
Click the 'generate token' button
A token to be output in the node's terminal output.
As Expected
Enter an invalid token into the input field and click 'submit'
The dashboard should not give the user access.
As Expected
Enter an valid token into the input field and click 'submit'
The dashboard should give the user acess to itself.
As Expected
Type a message and click send.
The node should receive the message from the dashboard and attempt to send it across the network.
As Expected
Connect to and then send a message to another node using the dashboard.
The node should connect to a pre-existing node and then send a message to it after a message is sent from the dashboard.
As Expected
Send a message to the node from another node.
The node on the receipient end of test 6 should receive the same message as was sent from the other node.
As Expected
Cycle 13
Use the Shell function to echo a message
The message to be echo'ed from the terminal
As Expected
Launch the database.
The database to launch and no crashes to occur.
As Expected
Stop the database.
The database to stop and no crashes to occur.
As Expected
Launch and then connect to the database.
The database to launch then accept the program's connection without any crashes.
As Expected
Get the last 5 messages from the database.
An array of messages to be returned in the expected type.
As Expected
Create a node reference in the database.
The reference to be created in the database.
As Expected
Create a node reference and then check if the software is aware of that node.
The "aware_of" check should return true for the reference test that already exists.
As Expected
Collect all references from the database.
Should return an array of node references in the expected type.
As Expected
Cycle 14
Send a message using web sockets
The message sent to be transmitted and received successfully.
Only works when sending to/from a macOS device (+ possibly Windows)
Send multiple messages for a prolonged period of time (once every 0.5 seconds for 30 seconds).
The messages to continue to be transmitted and validated consistently during the entire time.
Ran successfully for approximately 10 seconds and then crashed.
Last updated