New answers tagged

3 votes

Mock a bean with 10 methods when I only use one?

A number of options come to mind: Decompose ServiceTwo into an additional interface that ServiceTwo inherits from. This new parent interface would define the two methods that ServiceOne needs, or a ...
user avatar
2 votes

Should Functional Testing of an application be part of an application project/build or a seperate project ran independetly

If your project uses a single repository, the answer is fairly uncomplicated: The functional end-to-end tests are logically a part of your project and for that reason they should live in the same ...
user avatar
0 votes

In testing is making asserts in cleanup bad?

Just make sure that (a) the failing assertion is detected, and (b) your unit testing software can handle this - it may not expect assertions during the cleanup and misbehave in some way. So with your ...
user avatar
  • 37.4k
4 votes
Accepted

In testing is making asserts in cleanup bad?

I am less concerned about DRY code in unit tests, and more concerned about the test clearly stating the intended behavior. Doc Brown has sensible advice, but I would prefer the assert in each test. If ...
user avatar
2 votes

In testing is making asserts in cleanup bad?

This is ok as long as your test runner lets you still see easily which specific test caused the assertion to fail the failing assertion does not prevent the cleanup of the resources up to the point ...
user avatar
  • 184k
6 votes
Accepted

Testing interaction with proprietary software without a license

There's not much else that you can do on your own, but you may be able to get additional support from your client. In my experience, software vendors may offer licenses designed to support development....
user avatar
  • 75.6k
3 votes

Testing interaction with proprietary software without a license

Realistically, what you have described is all you can do. But there's no need to try to reverse engineer the whole of an application that you don't have access to anyway. All your functions need to is ...
user avatar
  • 8,560
3 votes
Accepted

Is it worth testing simple details?

Does worth testing simple details? Maybe? I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence -- Kent Beck, 2008 ...
user avatar
3 votes
Accepted

Manual Testing with OR condition/multiple valid entry points

No, you have two test cases: the behaviour may differ between the two, so you may want to declare one route as passing and the other failing. The "problem" here occurs when you have multiple ...
user avatar
2 votes

Is it worth testing simple details?

Every unit of implementation code is an asset. Every unit test is a line in your insurance policy. You get to decide which assets are protected and how exactly how they're fixed or replaced when they ...
user avatar
  • 13.2k

Top 50 recent answers are included