Week 4 progress

During this week we have discussed a lot about the project and the tools we are going to use from now. As we are working with a different development and we will only be doing the tests, we should work with tools that the dev team is comfortable using. The project is a web application, something that most of us have done before, but in different ways and using different tools. After talking a little bit with the other part of the team, we agreed to use VueJS instead of React for the front end, mainly because is a framework that most of use are familiar with. The database is going to be done with PostgresSQL, that already has it’s own testing framework. For the API the team decided to go with Golang and Travis for integration testing. The architecture looks like this:

architecture

The set-up is already available at the dev team repositories here:

Client – https://github.com/gdlroutes/client

API – https://github.com/gdlroutes/api/tree/develop

 

 

Our firsts tests

For this week our job was to learn to use the selected tools for testing. Carlos did a little bit of research for testing in Go, it’s going to be useful for the back-end. Jesus learned how to use Espresso to test android UI. Adler installed some tools from the NightmareJS for the front end and me, José, did a tutorial to install and use Junit4 for Java. Unfortunately, the project changed focus and we are not going to develop an Android app, so Java and Espresso are not going to be useful anymore. We are going to be developing only a web app. The good news is that we are already prepared with the research that Carlos and Adler did. Next week we hope to be installing and using demo tests in the repository of the project and perhaps do all the essential starting configuration.

Our code for junit is available on our GitHub here.

Project description

The project we are going to be working this semester is about smart cities. The objective is to build a platform that collect data around a specific city using tools like ArcGIS and ReactJS. The platform will also create tours of the city using the data and analysis and then guide the user trough the city using the GPS localization of the user’s phone. We need to be able to create, update and delete walk registers of the users and for that we may need a database to save all those registers, we are not sure if that is a requirement for the project but we will take it into consideration for the research that will be described in the next paragraph.

Mostly the languages that we are going to be working with are JavaScript and Java and some tools are the already mentioned ReactJS, ArcGIS and probably NodeJS. We are still not sure if we will need an SQL or no-SQL database but it would be good to know frameworks or tools for integration testing. With that information our team looked for some testing frameworks that will allow us to make testing easier for us in every aspect of the development:

Espresso:
Espresso is a powerful tool for testing purposes for android. Made by google it allows for testing of android applications by simulating app interaction in your test cases. It even allows to test interactions between your app and others. By using assertions and telling espresso where to click and what to input it allows app flow testing and general responses.

JUnit:
For unit testing, as android is mainly done with Java, JUnit should be the go to tool for being able to test the code and have easy test automation. It is easy to implement and helps to develop by TDD.

Mocha:
Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.

Since we will be using ReactJS for our project as the frontEnd framework, we need to really take in consideration the different tools we could integrate and use for its proper end-to-end testing. The ideal scheme is for users to constantly be using our system, so the most we focus on developing a high quality software, the best product will give to our customers.
We did a research and found out that we could start with diferent tools depending on the most accurate aproach.

NightmareJS:
NightmareJS is a high-level automation library wich has:
Niffy which detect UI changes and bus across releases of your web app, Daydream which is a chrome extension to record your actions into a puppeter script & Electron which helps you generate a cross-platform desktop app using html, css, js.

Enzyme:
Enzyme is a tool that goes great with Mocha. It is a JS testing utility for React that makes it easier to assert, manipulate and traverse a React Components’ output. It is said to be easy to learn (both Mocha and Enzyme) even for new users in a short period of time.

Protactor:
In class we talked about the goals on testing and mentioned Verification and Validation. Well, there is this tool called Protactor, which is for acceptance testing which means that a system is being tested to evaluate the compliance with the business requirements (or the validation stage). The bad thing about it is that it was originally designed for Angular, although it is possible to configure it to work with React. It also helps you testing your app against a wide variety of software.

Mongo-Orchestation:
We are still not sure what kind of database we are going to use for the project, but if we had to guess, we are probably going to need a no-SQL database because the data we will manipulate may be big or unstructured.  MongoDB is a database program that is based on documents, it is said that it’s easy to use and to set up in almost any project. To do testing easily in a MongoDB database there is Mongo Orchestation. Mongo Orchestration (MO) is an HTTP server providing a RESTful interface to MongoDB process management running on the same machine. This will help us to automate test for simple requests using mocked server responses.