Functional Foundations: Developing a WhatsApp Integration Test Case
1st day in developing the Pre-Task-2
Pre-Task-2 involves developing a basic test case to ensure the functionality and reliability of one of the proposed functionalities in the WhatsApp integration.
So, on March 19, I began to do the pre-task 2 provided by my mentor, Mr. Daniel Odongo. Here is the link to Pre-Task 2: https://github.com/ushahidi/platform/issues/4848. As mentioned by our mentor, we use Cypress for testing. I wasn’t familiar with the cypress, so I first started to learn the cypress. For learning Cypress, I prefer the Cypress documentation and some YouTube videos. When I was learning Cypress, I found it very interesting. I must say that because of Ushahidi and Outreachy, I learned so much in tech.
On March 19th and March 20th, I spent my entire day learning about Cypress and how it works. So, to use Cypress:
Install Cypress as a dev dependency in your project:
Step 1: Install Node.js and npm
If you haven’t installed Node.js yet, you can download it from the official Node.js website: https://nodejs.org/
Step 2: Create a New Project (if needed)
If you’re starting a new project, create a new directory for your project and navigate into it using your terminal.
Step 3: Initialize npm in your project
If you haven’t already initialized npm in your project, run the following command in your project directory:
npm init -y
Step 4: Install Cypress as a Dev Dependency
To install Cypress, run the following command in your project directory:
npm install cypress --save-dev
This will install Cypress and add it to your project’s package.json
as a dev dependency.
Step 5: Open Cypress Test Runner (Optional)
Once installed, you can open the Cypress Test Runner by running:
npx cypress open
This command will launch the Cypress Test Runner, and Cypress will set up its folder structure and example tests.