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

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Run the webportal on localhost.

Webportal launches and some text is displayed.

Manual

As expected, although contains additional features than just text.

2

Deploy the web-portal by git pushing to Github.

Vercel should automatically detect the changes and deploy the new version.

Manual

As expected

3

Run the node program

Output some kind of welcome message.

Manual

As expected, then proceeds to run the rest of the node software.

4

Download the node program by clicking the download button on the website.

The Node program should be downloaded to the test computer

Manual

As expected

Cycle 2

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Run "v --version" in the terminal.

Output of "V" then some version number and a hash of that update.

Manual

"V 0.3.1 5c716af"

2

Run "yarn start" in the node package's source folder.

The node software to be compiled and ran.

Manual

As expected

3

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.

Manual

As expected

4

Same as test 2.

Node software outputs a welcome message.

Manual

As expected

5

Same as test 2.

Node's web api should launch leading to "http://localhost:8000" displaying a welcome message.

Manual

As expected

6

Navigate to "https://monochain.network/download"

Be shown download instructions.

Manual

As expected

7

Download and unzip the node software.

Should download and unzip to an executable file.

Manual

As expected

8

Run the downloaded node software on an arm based macOS device.

Should run as tested in test 4 and 5.

Manual

As expected

Cycle 3

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

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.

Automated

As Expected

2

Load the new config file using "load_config()"

Config file should be loaded and returned.

Automated

As Expected

3

Load the new config file using "get_config()"

Config file should be loaded and returned.

Automated

As Expected

4

[Additional Test] Save and then load a configuration.

The data saved and then loaded back in should be exactly the same.

Automated

As Expected

Cycle 4

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Compile for Windows from a MacOS device.

Node program to compile and execute normally.

Manual

Failed, required a version of some header files that is not available for macOS ARM (my laptop)

2

Compile for Linux from a MacOS device.

Node program to compile and execute normally.

Manual

Failed with various header errors and indetifier errors

3

Run the Windows version on a non-windows system.

Computer running incorrect program should report some kind of error and close the program.

Manual

Does as expected

Cycle 5

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Generate a key pair.

Keys to be generated and validated successfully without crashing.

Automated

As Expected

2

Sign some random input data.

A signature to be generated without crashing.

Automated

As Expected

3

Sign then validate some random input data.

A signature to be generated then validated successfully.

Automated

As Expected

Cycle 6

I've changed the reference of the node that will be used in the test from "https://nano.monochain.network" to "http://nano:8000", this won't affect the actual test and just reflects a change of switching from handshaking with a publicly hosted server to using a locally hosted server.

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Send a ping request to "http://nano:8000"

The requester to successfully complete the ping request.

Manual

This had to be completed as a handshake event rather than a ping event but still worked as a proof of connection.

2

Receive a ping request as "http://nano:8000"

The receiver to successfully receive and process the request.

Manual

Same as above

Cycle 7

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Navigate throughout the website on a desktop/laptop device

The website to stay "intact" with no components becomming hidden or breaking.

Manual

As Expected

2

Navigate throughout the website on a phone/small device

The website to stay "intact" with no components becomming hidden or breaking.

Manual

All works except for a small section on the download page which goes off the page.

3

Open the site on desktop device.

The desktop styled navigation bar should appear along the top of the screen.

Manual

As Expected

4

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.

Manual

As Expected

Cycle 8

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Generate a key pair.

The program not to exit, which will happen if the key pair cannot be generated.

Automated

As Expected

2

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.

Automated

As Expected

3

Generate a key pair, sign and then verify some data.

The program not to exit and to verify that the message matches the signature.

Automated

As Expected

Cycle 9

There were no tests for this cycle and hence nothing to check.

Cycle 10

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

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.

Manual

As Expected

2

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.

Manual

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

Test
Instructions
Expected Result
Result
Passed?
1

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

2

Click the 'generate token' button

A token to be output in the node's terminal output.

As Expected

3

Enter an invalid token into the input field and click 'submit'

The dashboard should not give the user access.

As Expected

4

Enter an valid token into the input field and click 'submit'

The dashboard should give the user acess to itself.

As Expected

5

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

6

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

7

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

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Use the Shell function to echo a message

The message to be echo'ed from the terminal

Automated

As Expected

2

Launch the database.

The database to launch and no crashes to occur.

Automated

As Expected

3

Stop the database.

The database to stop and no crashes to occur.

Automated

As Expected

4

Launch and then connect to the database.

The database to launch then accept the program's connection without any crashes.

Automated

As Expected

5

Get the last 5 messages from the database.

An array of messages to be returned in the expected type.

Automated

As Expected

6

Create a node reference in the database.

The reference to be created in the database.

Automated

As Expected

7

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.

Automated

As Expected

8

Collect all references from the database.

Should return an array of node references in the expected type.

Automated

As Expected

Cycle 14

One of the tests in Cycle 14 has been skipped here as it was meant purely for during development as a proof of concept and the code that it was testing was then removed.

The code has also not changed between the end of cycle 14 and now so I have provided the same table and evidence as before.

Test
Instructions
Expected Result
Type of Test
Result
Passed?
1

Send a message using web sockets

The message sent to be transmitted and received successfully.

Manual

Only works when sending to/from a macOS device (+ possibly Windows)

2

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.

Automated

Ran successfully for approximately 10 seconds and then crashed.

Last updated