In this week’s sprint, we reviewed videos provided by Greg Schmidt, detailing what he wants from us to complete. From these we were able to see the possible directions, we as the team, could take to completing some of these story tasks. Our team, team Tapmah, was split between designing the bottom navigation bar or working on mocking the server for the project. Ultimately, we decided that we should focus on mocking a server that all groups could and would need to use to test that there aspects of the program are working. One utility that Andrew found that we have started to explore the use of is Nock, a mocking tool that is used for test modules which rely on http requests. When Andrew found that, I started looking into how this mocking works, finding several videos on Youtube which helped. It was through these videos that I found out about a feature of “mocha” called hooks, which is something that I had not seen previously. These hooks allow you to define code that will be run before or after each test suite, which is how we will be able to mock these servers. Learning about this mocking will definitely help me in the future with project, now having this knowledge. Knowing about this now and looking back at previous projects done with API’s I feel this knowledge would have helped me in testing some of the features I had tried. Also during the week I had looked at the video’s by Greg Schmidt about possible items the team may need to “mock” when other teams start requiring tests for their contributions. Some examples of things that will need to be mocked by the team will be the navigation points for the bottom bar, patient list, separate form selection, and multiple tabs. Each of these items will need to have a mock test to know that they are working as intended, without requiring an actual server to be getting replies from. Another bit of information that I found while doing all this research, as coding work has not really begun much yet, is that something like does have its downfalls with things like if the http response is complex.
References used: Mock requesting in unit testing