Skip to main content
Share Your Experience: Take the 2024 Developer Survey
36 votes
Accepted

With good unit tests, do I also need acceptance tests?

Is it still needed to write acceptance tests that target verifying those business rules implementation? Yes, it is absolutely necessary. Your unit tests cover the business rules in isolation. ...
Kate Paulk's user avatar
  • 31.5k
34 votes

Is it good practice to write unit tests when features are changed frequently?

Yes that is the ideal situation for Unit tests To look at a different situation - if you are writing software that will not be changed in the future then perhaps you could consider skipping the tests. ...
Michael Durrant's user avatar
16 votes

Is it good practice to write unit tests when features are changed frequently?

Yes, the idea of writing the right form of unit-tests is that it keeps the cost of change low. If you make a lot of changes they are here to help you go faster. The biggest mistake most people make is ...
Niels van Reijmersdal's user avatar
15 votes

How do testers perform unit testing?

The short answer - Usually they don't. Developers write unit tests and ideally run them every time the software builds. The longer version - Unit tests are intended to test a single unit of code. ...
Kate Paulk's user avatar
  • 31.5k
13 votes
Accepted

Test strategy to bring automated tests from UI to lower(API/Unit) layers?

A key strategy for me is to convince the business of what needs to be tested where, otherwise... they'll end up directing testing everything through the UI... So the two key main points I am making ...
Michael Durrant's user avatar
11 votes
Accepted

Implementing the Test Pyramid as QA

I am definitely using the test pyramid as one of my 'guidance' tools. I frequently combine it with the 4 Agile Testing quadrants in talks and presentations.        &...
Michael Durrant's user avatar
11 votes

Should QA test features that are already covered by developers (according to what they say) with unit tests?

There is no concept of overlapping testcases in different test levels, Both are completely isolated Just because API or Component works fine you cannot guarantee the whole system or integrated system ...
PDHide's user avatar
  • 11.1k
11 votes
Accepted

Should integration tests test business logic?

No if it can be done in Unit tests The answer however is not a yes / no as this is not really a binary choice. When possible use Unit tests. If you are testing 'based on this information from this ...
Michael Durrant's user avatar
9 votes
Accepted

Will writing unit tests block developers from coding?

The TDD cycle is more a development cycle for a developer, to quote James Shore, The Art of Agile, Test-Driven Development chapter: Programmers new to TDD are often surprised at how small each ...
Niels van Reijmersdal's user avatar
8 votes
Accepted

Where do Fitnesse fits between unittests and API testing?

Full disclosure: we rely heavily on FitNesse, run many hours worth of FitNesse tests daily in our CI buildbot daily, and I personally wrote both FitNesse tests (using Fit wiki format in browser) and ...
Peter M. - stands for Monica's user avatar
8 votes
Accepted

Pros and cons of python unit testing packages

Nose is no longer maintained: Nose has been in maintenance mode for the past several years and will likely cease without a new person/team to take over maintainership. New projects should ...
alecxe's user avatar
  • 11.4k
7 votes

Test strategy to bring automated tests from UI to lower(API/Unit) layers?

Estimate working load, how many test cases are there to be migrated from UI tests? Estimate how much time you can spare in each sprint and discuss with your team leader and your fellow members ...
Yu Zhang's user avatar
  • 9,942
7 votes
Accepted

Random code changes - terminology and tools

Mutation testing (or mutation analysis or program mutation) is used to design new software tests and evaluate the quality of existing software tests. Mutation testing involves modifying a program ...
Niels van Reijmersdal's user avatar
7 votes
Accepted

Is unit testing related only to software development?

Yes, Unit-testing is only software related. No testing the implementation of a dashboard cannot be considered Unit-testing. Unit-tests typically test relatively small programming functions. A ...
Niels van Reijmersdal's user avatar
7 votes

Is it good practice to write unit tests when features are changed frequently?

Yes. Because those bits that do not change still need testing. The rest that does change, well, that's just a part of the process, you simply need to change things once in a while. Writing tests makes ...
pavelsaman's user avatar
  • 4,548
6 votes

How can testers motivate developers to write unit tests?

Unit test are far superior in detecting root cause of the bug, compared to e2e tests. Maybe I am lucky, but our developers are religious about adding unit tests - because they experienced that it ...
Peter M. - stands for Monica's user avatar
6 votes
Accepted

How can testers motivate developers to write unit tests?

It starts with explaining developers to take their discipline serious. They should follow the programmers oath. I will produce, with each release, a quick, sure, and repeatable proof that every ...
Niels van Reijmersdal's user avatar
6 votes
Accepted

Naming a positive "happy path" test case

If there is one thing I like about good test names is that when it fails on a build-server I can understand what is broken just from reading its name. If the name of the test does not describe what it ...
Niels van Reijmersdal's user avatar
6 votes

Should I push my changes for testing and then work on unit tests?

Oh, that's a long one. Let's take two points of view: Pragmatic POV: they insist on faster delivery Saying that TDD would decrease delivery speed is not necessarily true. If you search for studies ...
João Farias's user avatar
  • 10.9k
6 votes

Should integration tests test business logic?

I think you fell on the Integrated Tests scam. Integration tests are about "determining if independently developed units of software work correctly when they are connected to each other". ...
João Farias's user avatar
  • 10.9k
5 votes

Will writing unit tests block developers from coding?

I'd plan it this way: The specific tests that are written 'before the code' are unit tests that are written by developers just before they write the actual code. It should only take 5-20 minutes to ...
Michael Durrant's user avatar
5 votes

With good unit tests, do I also need acceptance tests?

Yes you should have scenarios which verify the unit tested business rules. Some reasons: good unit tests mock and stub the datastore. Acceptance tests make sure it is configured and works correctly....
Michael Durrant's user avatar
5 votes
Accepted

Try Assert Exceptions not failing test in python unittest or better way to loop through failures

I think you just need to re-raise the assertion error after printing out log messages: try: self.assertEqual(len(self.verificationErrors), 0) # no errors except AssertionError as e: for ...
alecxe's user avatar
  • 11.4k
5 votes

How to setup a Headless-Browser Unit-Test for Angular application?`

Angular has some great tooling for running tests, namely Karma and Protractor. By default (at least when using Angular CLI) they run using Chrome. So when you execute the tests from command-line, it ...
saif sadiq's user avatar
5 votes

Mathematical / statistical relationship between tests and bugs?

There is no correlation between the number of tests in a codebase and the number of bugs found in production. This makes sense if you think about it. If the tests are created solely to pass some "...
newsn31's user avatar
  • 609
5 votes

How to handle “fake” unit tests that don’t really test anything?

I believe that the strongest instrument for filtering such a-low-quality tests is a code review. You can power-up your code review with mutational testing techniques which will help you to detect the ...
Alexey R.'s user avatar
  • 11.6k
5 votes
Accepted

How unit testing helps QA testers?

On my mind comes at least three thing: If unit test are developed by developer with focus on testing simple functionality: then you as tester (this highly depends on experience of developer with for ...
tugo's user avatar
  • 323
5 votes

Best practice guide for documenting unit tests?

Carefully name tests reflecting requirement in the form of input data & expected result. I have been in similar situation but for integration UI tests, where it really helped us when we started ...
Vishal Aggarwal's user avatar
5 votes
Accepted

How to choose between shell script vs compiled, from testing perspective

Here are some cons for shell scripting that would make me take my decision towards "compiled" case: Shell scripts are more dependent on the execution context. So this impacts the ...
Alexey R.'s user avatar
  • 11.6k
5 votes
Accepted

How to create input data for unit tests for an API client?

You're definitely on the right track here. I would start by collecting actual requests and responses generated by the live system, then anonymize as needed. These would be the seeds of your tests, ...
Kate Paulk's user avatar
  • 31.5k

Only top scored, non community-wiki answers of a minimum length are eligible