Skip to main content

All Questions

0 votes
3 answers
125 views

Should we test private data (static objects in this case) to make sure it maintains its structure?

I had a discussion at work about whether to unit test a private static object we're using as data for a public component. const data = { 45: { name: 'John' }, 2: { name: 'Patricia' }, 27: { name: '...
Jose Daniel Vivar Personat's user avatar
4 votes
5 answers
5k views

Is it bad practice to supply command line arguments for unit tests

I am on C++ and using gtest as the main framework. Say I have a edge detection function I want to test that takes an image as an input and returns the edge detected image. I have 3 images ready to be ...
user3667089's user avatar
8 votes
3 answers
4k views

Is it right to skip unit testing and go straight writing integration tests if there's no point of testing the unit in isolation?

According to Martin Fowler's article, https://martinfowler.com/bliki/TestPyramid.html It is advisable to write more unit tests than integration tests. Does this mean ideally that every unit of work ...
Xegara's user avatar
  • 191
2 votes
1 answer
1k views

Unit-testing databases: test all possible permutations of read and write to table?

I am testing a resource management class that is interacting with a database or a file system, or a combination of both. I was wandering if it is the norm to test all possible permutations of read and ...
DudeOnRock's user avatar
  • 1,079