Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8699089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:51:47+00:00 2026-06-13T01:51:47+00:00

I am working with whats going to turn into quite a big node.js -based

  • 0

I am working with whats going to turn into quite a big node.js-based javascript application and started to think about how I should organize my testing.
The application is basically a REST API, so requests are authenticated, user submitted data is validated and then persisted in a database.

I am completely unfamiliar on how to organize the testing of a project of this size.

Should I test each resource separately starting with modular unit testing, ending with full scale integration testing?
Or should I test layerwise – ie authentication, validation, persistence & integration separately for each resource?

What is common sense?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:51:48+00:00Added an answer on June 13, 2026 at 1:51 am

    There is no right or wrong way of testing. Important thing is to have meaningful tests that add value. Its better to have some tests than not having anything.

    My approach is to write tests for stuff that I am working on without differentiating unit and integration tests. So, if am working on the REST service then I will write tests for the REST service. If I am working on authentication, persistence then I will write tests for authentication, persistence.

    Its also important to write tests that also setup and manage test data needed for the tests. This is important so that anyone can execute your tests. It is also important that your tests can execute on on a Continuous Integration environment out of the box.

    Tests for every defect you fix

    If am working on a defect, then I will write tests that fails i.e. reproduces the defect and then I verify that my test passes after my code fix. This in my opinion is most important thing to do. As theses tests verify that issues once fixed stay fixed.

    Refactoring Code

    Value of all the tests you write becomes clear handy when you do some code refactoring. If your refactored code fails your existing tests then your refactored code is broken and needs to be fixed till your all existing tests pass.

    When you don’t have time

    If you have to pick and choose between the type of tests due to lack of time then or some other reason then writing broader tests or end to end tests or integration tests give the most value as theses tests exercise authentication, persistence, etc directly or indirectly. Compare this to unit tests for persistence you get more out of integration tests as integration tests will tests your persistence indirectly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use some code to turn urls into working links with php. But the
What's going on? : The accordion is working properly, but the tabs show up
I don't know what is going but my jquery validate plugin(1.5.5) is not working
Can anyone help me understand what is going on here? Jenkins has been working
Almost finished my java web app. All working fine. Whats next. I need now
I'm working on what should (hopefully) be a small feature for a .NET software
This should be totally simple but I can't get it working no matter what
I've got a medium scale project (a turn-based game) that's currently written in C/C++.
I am currently working on a text based web game, where in I simulate
I'm working on an application that needs to accept posted data from a form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.