Skip to content

mayankdp/KnowledgeBase-App

Repository files navigation

Knowledgebase

Our app will be a Social trivia app that will have categories of multiple choice questions.
More details will be provided here

External Requirements

In order to build this project you first have to install:

Setup

After you have installed the components required above:

  • Using terminal, clone the repo on your device git clone https://github.com/SCCapstone/Knowledgebase.git
  • cd into the main repo folder and run npm install (you may need to do sudo)

Running

Browser

  • To run on your browser, simply do in the main folder of the repo: ionic serve

iOS

To run on iOS: {You will need to have Xcode}

  • ionic build

  • ionic cap add ios

  • ionic cap open ios

  • Then it will open Xcode. Choose App -> Signing & Capabilities -> Team (Add your account if you don't have one).

  • After that select iOS Simulator or your phone if you have connected.
    iOS-1

  • Then Click play button.
    iOS-2

  • If you decide to run on phone then you may have to go to (settings -> General -> Device Management) after above steps.
    Make sure dark mode is off on your device.

Android

To run on Android: {You will need to have Android Studio}

  • Open up Android Studio and click on "Configure" on the bottom right.
  • Choose AVD Manager
  • Here you will see a list of your virtual devices, open up any device you would like.
  • If you do not have any devices, you can follow this tutorial to create one here
  • After you have your device open, simply run ionic cap run android -l --external

Testing

Unit Testing

  • After you have cloned this repository, go into the Knowledgebase directory and run npm install or sudo npm install command in the terminal.
  • After it has completed installing the packages, run npm run test command.
  • You will be shown an interface like this, simply press a to run all of the tests.

  • This command will run each test one by one until all tests are done running.
  • The directory of all test files are here

E2E Testing

For the behavioral testing part of testing, we decided to go with an e2e testing technique. E2E testing runs through all of the core features / functions of our app and tests if they are all working as they should. We are using a library called Cypress to achieve this.

  • Start by starting up an instance of the app on your local host by doing ionic serve in the main folder.
  • Now, open a new terminal and navigate to the repo and run npx cypress open
  • This will open a seperate window with the cypress menu. Click on 'test.spec.js' to begin the testing.
  • As soon as you click on the file, an instance of chromium will open in which you will see the program running through the app and testing all of the features and functions as if a normal user would.

A video of showing how the E2E testing looks: https://user-images.githubusercontent.com/45472641/115975221-e68dd480-a530-11eb-872a-c1aad95e5fcd.mov

Testing Technology

  • For the Unit testing, we used the built in libraries that come with Ionic which are Jest and React Testing library. More information on those here

  • For the E2E Testing, we used a library called Cypress. Cypress also has integration with Ionic and works very well and is easy to understand. More information on Cypress here

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published