diff options
| author | Tom Harley | 2018-03-07 19:52:32 +0000 |
|---|---|---|
| committer | Tom Harley | 2018-03-07 19:52:32 +0000 |
| commit | abbb4cdaf89c57fc7ddfaaf6c7edfa65d12acb36 (patch) | |
| tree | 2207f1b11cf2a37ee7e3431582766440087f5203 /Report/texts | |
| parent | Add burndown chart and toc (diff) | |
| download | medicine-abbb4cdaf89c57fc7ddfaaf6c7edfa65d12acb36.tar.gz medicine-abbb4cdaf89c57fc7ddfaaf6c7edfa65d12acb36.zip | |
Fix minor report problems
Diffstat (limited to 'Report/texts')
| -rw-r--r-- | Report/texts/conversion.tex | 2 | ||||
| -rw-r--r-- | Report/texts/testing.tex | 20 | ||||
| -rw-r--r-- | Report/texts/typings.tex | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/Report/texts/conversion.tex b/Report/texts/conversion.tex index b56ebf0..87db332 100644 --- a/Report/texts/conversion.tex +++ b/Report/texts/conversion.tex @@ -131,5 +131,5 @@ files, since there is no way that a backend server could possibly predict what t Additionally, there are also many cases where an end-user may wish to deliberately store something in a format which a backend server checking legitimacy of the file would complain about incorrectly. -The team hasn't really looked into things such as Excel (\file{.xlsx}) files, however again, premptively looking, there seems to +The team hasn't really looked into things such as Excel (\file{.xlsx}) files, however again, pre-emptively looking, there seems to be fairly wide library support for things like this, so it was not a major concern for this deliverable. diff --git a/Report/texts/testing.tex b/Report/texts/testing.tex index d5c0fc7..e3f709b 100644 --- a/Report/texts/testing.tex +++ b/Report/texts/testing.tex @@ -1,15 +1,15 @@ \section{Testing} -Tests do not currently run on the gitlab server, as the postgres integration with the docker gilab-ci is still missing. This means any tests run automatically when pushing will fail. \par -When running integration tests locally, please make sure the postgres server is up and running on localhost. +Tests do not currently run on the gitlab server, as the postgres integration with the docker gitlab-ci is still missing. This means any tests run automatically when pushing will fail. \par +When running integration tests locally, please make sure the postgres server is up and running on localhost. \subsection{Structure} -Testing files were restructured for a more organised and professional approach. All test files end in "*.\(<\)context\(>\).test.ts" and were moved to the "test" directory. At this moment, "\(<\)context\(>\)" includes "unit" and "routes". Further, they were categorised into \textit{integration} and \textit{unit} tests and moved into corresponding sub-directories. \par -Apart from making test files easier to find, this new structure also allowed us to run specific tests independently to isolate failures and quickly rerun individual tests. For example \texttt{yarn test:routes:auth} runs all authentication tests. +Testing files were restructured for a more organised and professional approach. All test files end in ``*.\(<\)context\(>\).test.ts'' and were moved to the ``test'' directory. At this moment, ``\(<\)context\(>\)'' includes ``unit'' and ``routes''. Further, they were categorised into \textit{integration} and \textit{unit} tests and moved into corresponding sub-directories. \par +Apart from making test files easier to find, this new structure also allowed us to run specific tests independently to isolate failures and quickly rerun individual tests. For example \texttt{yarn test:routes:auth} runs all authentication tests. \subsection{Integration Testing} -\texttt{yarn test:routes} +\texttt{yarn test:routes} This category of tests targeted the interplay of different server components as it tested server endpoints (routes) rather than internal functions. We aimed to test all routes for responses of success, and various degrees of failure. \par -E.g. \textbf{"auth.routes.test.ts"} tested the authentication middle-ware, checking existing users could log in only with correct usernames, passwords and reauthentication tokens. During our later meetings, we realised that security is a key-component of medical systems, and requires further much more in-depth testing to guarantee safety of patient data. \par -\textbf{"protocol.routes.test.ts"} aims to cover all endpoints specified in the agreed protocol by using the \textit{mocha-each} npm module. This allowed us to write few mocha testing functions iterating over the long list of endpoints, checking HTTP responses to fit the JSON response templates to conform to the protocol. This form of testing is still incomplete. +E.g. \textbf{``auth.routes.test.ts''} tested the authentication middle-ware, checking existing users could log in only with correct usernames, passwords and reauthentication tokens. During our later meetings, we realised that security is a key-component of medical systems, and requires further much more in-depth testing to guarantee safety of patient data. \par +\textbf{``protocol.routes.test.ts''} aims to cover all endpoints specified in the agreed protocol by using the \textit{mocha-each} npm module. This allowed us to write few mocha testing functions iterating over the long list of endpoints, checking HTTP responses to fit the JSON response templates to conform to the protocol. This form of testing is still incomplete. \subsection{Unit Testing} -\texttt{yarn test:unit} -The main motivation for this category of tests was to find bugs early on without having to run the whole server. This saves time and uncovers new code breaking old functionality. We also found that unit tests improved the design process by forcing implementation of code that is testable. Furthermore, unit tests were often used as a form of documentation, as it aided in understanding how code of other team members worked and could be used. \par -We decided that each team-member was responsible for creating the unit tests for their code. Unfortunately the number and coverage of unit tests is still quite low. This may be the result of prioritising functionality over bug-resilience and test-driven development. +\texttt{yarn test:unit} +The main motivation for this category of tests was to find bugs early on without having to run the whole server. This saves time and uncovers new code breaking old functionality. We also found that unit tests improved the design process by forcing implementation of code that is testable. Furthermore, unit tests were often used as a form of documentation, as it aided in understanding how code of other team members worked and could be used. \par +We decided that each team-member was responsible for creating the unit tests for their code. Unfortunately the number and coverage of unit tests is still quite low. This may be the result of prioritising functionality over bug-resilience and test-driven development. diff --git a/Report/texts/typings.tex b/Report/texts/typings.tex index 65a0de0..36297b7 100644 --- a/Report/texts/typings.tex +++ b/Report/texts/typings.tex @@ -18,7 +18,7 @@ https://github.com/DefinitelyTyped/DefinitelyTyped/% tree/master/types/mocha-each}. \subsection{pmx} -The package pmx (as previously described in \S\ref{sec:pmx}) is useful for +The package pmx (as previously described in \S\ref{sec:pms}) is useful for profiling. Similarly to mocha-each, however, it does not have supported typing. Since this package covers a far wider range of functionality, and since said functionality is very involved with sensitive run-time engine manipulation, |
