• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

205
Views
Is it better to first split tests by application modules or by test types?

What should be the top level folders split for tests in JavaScript/TypeScript?

E.g. if my application has the following logical modules: AdminPanel, Profile, ProductsListPage. And I have the following Mocha type tests: e2e, smoke, integration, unit.

Should my folder sctructure be:

AdmintPanel:
  e2e
  smoke
  integration
  unit
Profile:
  e2e
  smoke
  integration
  unit
ProductsListPage:
  ...

Or is it better to have the following folders structure:

e2e:
  AdminPanel
  Profile
  ProductsListPage
smoke:
  AdminPanel
  Profile
  ProductsListPage
integration:
  ...
unit:
  ...

My guts tell me that splitting by test types first is better, but I lack any constructive arguments to support my point of view. So, I can not persuade my colleagues to follow the test types first approach. I tried to google best practices on the matter but did not succeed finding anything. So, hopefully someone on SO know the best practices in this respect.

about 3 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error