Skip to content

Latest commit

 

History

History
52 lines (46 loc) · 1.45 KB

Types of Testing.md

File metadata and controls

52 lines (46 loc) · 1.45 KB

Types of JavaScript Testing

Unit Testing

Tests individual units or components of the JavaScript code, typically functions or methods

  • Purpose: To ensure that each part of the code performs as intended
  • Tools
    • Vitest
    • Jest
    • Mocha
    • Jasmine
    • QUnit

Integration Testing

Focuses on the interaction between different units or components of the application

  • Purpose: To verify that integrated components work together correctly
  • Tools
    • Vitest
    • Mocha
    • Chai
    • Jest
    • Sinon

Functional Testing

Tests the application's functionality by simulating user interactions

  • Purpose: To ensure the software behaves as expected in real-world scenarios
  • Tools
    • Cypress
    • TestCafe
    • Selenium

End-to-End (E2E) Testing

Tests the complete flow of an application from start to finish

  • Purpose: To verify that the entire application works together and meets all requirements
  • Tools
    • Cypress
    • Puppeteer
    • Nightwatch.js

Performance Testing

Measures the responsiveness, stability, and scalability of the JavaScript code

  • Purpose: To ensure the application performs well under expected and peak loads
  • Tools
    • Lighthouse
    • WebPageTest

Regression Testing

Re-tests the application after changes to ensure existing functionality is not broken

  • Purpose: To catch new bugs introduced by recent code changes
  • Tools
    • Selenium
    • Cypress
    • Jest