SlideShare a Scribd company logo
1 of 7
COURSE NAME : MERN STACK WEB
DEVELOPMENT (MSWD)
COURSE CODE: 22SDCS01R
TOPIC: INTRODUCTION TO VALIDATION
FACULTY NAME : Y AMARAIAH
1
FEATURES OF VALIDATION
• Testing is a crucial aspect of software development in the MERN (MongoDB,
Express.js, React, Node.js) stack, It helps ensure that data is accurate,
consistent, and secureBefore executing the program lets verify the code properly
displaying the cpntent
• Client side validation,server side validation,data validation,form
validation,custom validation for fixing and handling the error handling
• It ensures to make security and integrity as well as accuracy….
2
FEATURES OF VALIDATION
• key features and considerations for testing in the MERN stack
• Backend (Node.js/Express): Use testing frameworks like Mocha, Jest, or
Jasmine to write unit tests for individual functions and modules.
• Frontend (React): Utilize Jest along with tools like Enzyme or React Testing
Library for unit testing React components.
• Real tie validation,custom validation,localized validation message
• Custom Error Handling Middleware
• Authentication and Authorization.
3
MODULES
• A set of functions you want to include in your application.
• Forntend :React testing
• Test framework just,test
• Utitilities: React framework LIBRARY,
• Data base testing :mongodb memory server.
Declarative schema validation.
• Support for complex validation rules.
• Integration with Hapi.js and other frameworks.
4
REQUIRE()
5
Install Dependencies:
First, install the necessary dependencies using npm:
bash
Copy code
npm init -y
npm install mocha chai
Create a Simple Function:
function add(a, b) { return a + b; } module.exports = add;
Write a Test:
Tests.program
Configure and Run the test
MODULE
Node.js typically involves various modules and tools to cover different aspects of
testing
1 mocha :rich testing module
2 chai : like mocha It provides a wide range of assertion styles, allowing developers
to choose the one that fits their preference.
3 Supertest: Description: Supertest is an HTTP assertion library often used in
combination with Mocha to test Express.js applications by making HTTP
requests and asserting the responses.
4 jest,enjyne,sinon,mocking and mongo db modules are using
6
STREAMS AND FILES
• validation practices across different layers of your MERN stack application, you can enhance the
security, reliability, and integrity
• streams and files is a common requirement, especially when handling file uploads, processing large
datasets, or managing file storage.
• Stream in node js
• Express.js
• React frontend
• Mongodb for data storing
• var fs = require('fs’);
where fs file stream
7

More Related Content

Similar to 23003481387PPT.pptx

Puppet Camp Charlotte 2015: Managing middleware with Puppet
Puppet Camp Charlotte 2015: Managing middleware with PuppetPuppet Camp Charlotte 2015: Managing middleware with Puppet
Puppet Camp Charlotte 2015: Managing middleware with Puppet
Puppet
 
Psi cgl test_auto_casestudy_v01
Psi cgl test_auto_casestudy_v01Psi cgl test_auto_casestudy_v01
Psi cgl test_auto_casestudy_v01
Primesoftinc
 
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
NaviAningi
 

Similar to 23003481387PPT.pptx (20)

Testing with Spring: An Introduction
Testing with Spring: An IntroductionTesting with Spring: An Introduction
Testing with Spring: An Introduction
 
Puppet Camp Charlotte 2015: Managing middleware with Puppet
Puppet Camp Charlotte 2015: Managing middleware with PuppetPuppet Camp Charlotte 2015: Managing middleware with Puppet
Puppet Camp Charlotte 2015: Managing middleware with Puppet
 
Resume_Trupti
Resume_TruptiResume_Trupti
Resume_Trupti
 
Testing Angular
Testing AngularTesting Angular
Testing Angular
 
Feedback on building Production-Ready Microsoft Teams Apps
Feedback on building Production-Ready Microsoft Teams AppsFeedback on building Production-Ready Microsoft Teams Apps
Feedback on building Production-Ready Microsoft Teams Apps
 
Testing Strategies for Node.pdf
Testing Strategies for Node.pdfTesting Strategies for Node.pdf
Testing Strategies for Node.pdf
 
Microsoft Fakes, Unit Testing the (almost) Untestable Code
Microsoft Fakes, Unit Testing the (almost) Untestable CodeMicrosoft Fakes, Unit Testing the (almost) Untestable Code
Microsoft Fakes, Unit Testing the (almost) Untestable Code
 
Unit Tests with Microsoft Fakes
Unit Tests with Microsoft FakesUnit Tests with Microsoft Fakes
Unit Tests with Microsoft Fakes
 
Psi cgl test_auto_casestudy_v01
Psi cgl test_auto_casestudy_v01Psi cgl test_auto_casestudy_v01
Psi cgl test_auto_casestudy_v01
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Automation
AutomationAutomation
Automation
 
Automation
AutomationAutomation
Automation
 
Test-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsTest-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basics
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
 
Building a Continuous Delivery Pipeline With Visual Studio
Building a Continuous Delivery Pipeline With Visual StudioBuilding a Continuous Delivery Pipeline With Visual Studio
Building a Continuous Delivery Pipeline With Visual Studio
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce Applications
 
Selva_Selenium
Selva_SeleniumSelva_Selenium
Selva_Selenium
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and Tools
 
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
190711_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
 
KKSD_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
KKSD_Testbirds_Selenium_eclipsecon_FINAL_0.pptKKSD_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
KKSD_Testbirds_Selenium_eclipsecon_FINAL_0.ppt
 

Recently uploaded

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

23003481387PPT.pptx

  • 1. COURSE NAME : MERN STACK WEB DEVELOPMENT (MSWD) COURSE CODE: 22SDCS01R TOPIC: INTRODUCTION TO VALIDATION FACULTY NAME : Y AMARAIAH 1
  • 2. FEATURES OF VALIDATION • Testing is a crucial aspect of software development in the MERN (MongoDB, Express.js, React, Node.js) stack, It helps ensure that data is accurate, consistent, and secureBefore executing the program lets verify the code properly displaying the cpntent • Client side validation,server side validation,data validation,form validation,custom validation for fixing and handling the error handling • It ensures to make security and integrity as well as accuracy…. 2
  • 3. FEATURES OF VALIDATION • key features and considerations for testing in the MERN stack • Backend (Node.js/Express): Use testing frameworks like Mocha, Jest, or Jasmine to write unit tests for individual functions and modules. • Frontend (React): Utilize Jest along with tools like Enzyme or React Testing Library for unit testing React components. • Real tie validation,custom validation,localized validation message • Custom Error Handling Middleware • Authentication and Authorization. 3
  • 4. MODULES • A set of functions you want to include in your application. • Forntend :React testing • Test framework just,test • Utitilities: React framework LIBRARY, • Data base testing :mongodb memory server. Declarative schema validation. • Support for complex validation rules. • Integration with Hapi.js and other frameworks. 4
  • 5. REQUIRE() 5 Install Dependencies: First, install the necessary dependencies using npm: bash Copy code npm init -y npm install mocha chai Create a Simple Function: function add(a, b) { return a + b; } module.exports = add; Write a Test: Tests.program Configure and Run the test
  • 6. MODULE Node.js typically involves various modules and tools to cover different aspects of testing 1 mocha :rich testing module 2 chai : like mocha It provides a wide range of assertion styles, allowing developers to choose the one that fits their preference. 3 Supertest: Description: Supertest is an HTTP assertion library often used in combination with Mocha to test Express.js applications by making HTTP requests and asserting the responses. 4 jest,enjyne,sinon,mocking and mongo db modules are using 6
  • 7. STREAMS AND FILES • validation practices across different layers of your MERN stack application, you can enhance the security, reliability, and integrity • streams and files is a common requirement, especially when handling file uploads, processing large datasets, or managing file storage. • Stream in node js • Express.js • React frontend • Mongodb for data storing • var fs = require('fs’); where fs file stream 7