11 votes
Accepted

The concept of "quality gates" in software testing

A test suite should only pass if all tests pass. Otherwise, the tests become worthless. What is an important failure, what is a failure that can be ignored? The result would be that all test failures ...
amon's user avatar
  • 134k
11 votes

Integration vs Functional Testing

1) Is this a functional test or an integration test? Functional testing and integration testing are classifications of tests, and they are not mutually exclusive. In this case it's both. Integration ...
Samuel's user avatar
  • 9,187
11 votes

Should tests perform a single assertion, or are multiple related assertions acceptable

Ask yourself what unit tests are good for. The main purpose is that after changing your code, you run all the unit tests, and if they all pass, you have a bit more confidence that your code is fine. ...
gnasher729's user avatar
  • 44.7k
11 votes
Accepted

How do I test a user receiving a text?

You're using a third-party API, so you don't need to spend a lot of effort to automate testing the functionality provided by that API. You need to focus testing on your application's interactions with ...
Thomas Owens's user avatar
  • 82.3k
10 votes
Accepted

How to manage non-unit tests in a project?

It looks like later versions of Junit support categories of tests. These can be useful to classify each test. Then when the build automation runs, it can include or exclude those tests based on ...
Jon Raynor's user avatar
  • 11.4k
9 votes
Accepted

Automated Tests on Dynamic Content

You seem to be on the right path for live, automated testing, but have some significantly complicating factors: Dynamic content ups the difficulty of specifying a test. You often have to state it in ...
Jonathan Eunice's user avatar
8 votes

In a testing phase,can I raise a defect which has occured due to deployment issues?

On the one hand, the developers want bugs that are in the code that need to be fixed. On the other hand, how is QA supposed to know whether it's code, data, scripts, or human error? QA knows that it ...
Kevin Fee's user avatar
  • 2,837
8 votes

Should tests perform a single assertion, or are multiple related assertions acceptable

Each unit test should assert a single requirement. Now, you may not always have formal requirements for every method. Methods are written in pursuit of fulfilling such formal requirements. But ...
Robert Harvey's user avatar
8 votes
Accepted

How to comprehensively test software that doesn't play well with testing?

I'm afraid there is no easy solution. "write testable code" really is the only way to do it. Writing testable code is non-trivial, and retro-fitting tests is hard. Many of the advances in modern ...
Robin Bennett's user avatar
8 votes

Doesn't "Always test through the public interface" contradict testing of individual composed functions?

It's not the size of the function. It's how it's used. Let's take some well tested functions, + - * and Math.sqrt(), and compose them into a distance function: function getDistance(xA, yA, xB, yB) { ...
candied_orange's user avatar
7 votes
Accepted

Is checking for unexpected types in dynamic languages in an untyped project necessary?

does it make sense to verify the types and write unit tests that unexpected types are dealt with properly Sort of - replace "unit tests" by "automatic tests", and then the answer becomes yes. If ...
Doc Brown's user avatar
  • 206k
7 votes

How to comprehensively test software that doesn't play well with testing?

You are not alone Though a redundant mention, anyone reading this question while not having this kind of trouble ought to remember that real-life software development is full of cases of multi-year ...
Vector Zita's user avatar
  • 2,442
6 votes
Accepted

Is there a valid reason to separate expectations from tests?

From your description, there is no plausible reason for keeping actions and expected results that separate. Exporting data to external resource files makes sense if there is a high probability that ...
Kilian Foth's user avatar
6 votes

How do I test unreachable code?

Seriously, mock that proxy. It is a boundary of the system you are testing. Either create: A Full Stub that replaces the third party system entirely. Make it smart enough to handle a request in ...
Kain0_0's user avatar
  • 16.1k
5 votes

What are the drawbacks of modeling (unit) test fixtures in JSON instead of using ObjectFactories?

I've written tests that were JSON supported before. Here were the drawbacks: JSON is not compiler-checked. This means if you add a field to your models, you won't know your test JSON is broken until ...
Samuel's user avatar
  • 9,187
4 votes
Accepted

Should the developer provide steps/directions for SQA?

If you don't know an application or a feature in an application well enough to basically use it, you need to learn this first, that is an obvious prerequisite of any testing. There are two ways to do ...
Doc Brown's user avatar
  • 206k
4 votes
Accepted

Side-by-side Functional and Acceptance Testing (SpecFlow)

I don't know if I agree with your premise. And I think you are kind of conflating a bunch of ideas and terms. functional testing is any testing that tests the functions of your system. this may be ...
Fran's user avatar
  • 859
4 votes

How to test a web app (inc write paths) for acceptance or integration tests, without db access?

There are several questions here so I will try and answer the initial one of "For example the test that deletes a resource will fail if run the second time. " Ideally a good practice is for testing ...
Michael Durrant's user avatar
4 votes

Is this testing practice unit testing, regression testing, and/or functional testing?

Don't get too hung up about terminology. These terms are not precisely defined, and they are not necessarily exclusive. Unit testing is definitely the wrong term, since it refers to testing smaller ...
JacquesB's user avatar
  • 58.7k
4 votes
Accepted

Unit testing and other forms of testing

Strangely enough the best answer to this question is the Single Responsibility Principle. But that only works if you think of it in the revised way Uncle Bob explains it today. If you think of SRP as ...
candied_orange's user avatar
3 votes

Is this testing practice unit testing, regression testing, and/or functional testing?

This is basically integration testing. It's definitely not unit testing as you are using an additional piece to test it (the python). Whenever you test the final product of your application - in this ...
enderland's user avatar
  • 12.1k
3 votes

Should the developer provide steps/directions for SQA?

In my sense, the best way to get an application tested, is to put someone who doesn't know the project at all; especially how it works. Here some points for why: If the project has a user guide/...
Kane's user avatar
  • 371
3 votes

What are the best practices for managing Test results

The test results should be managed in the same git repository. You don't need to save results of every run, you only need to save the results for a single run. All other runs should compare itself to ...
Bryan Oakley's user avatar
  • 25.3k
3 votes

How do you properly test a complete software replacement

I am assuming that the test suite for System A has good test coverage. This is maybe a good assumption. But you know what they say about assumptions... A more fundamental question to ask is: what ...
enderland's user avatar
  • 12.1k
3 votes

Unit testing and other forms of testing

Unit tests and integration tests exists for different reasons. Unit tests are written by programmers to test only one function (responsibility). Here you can apply SRP rule. Tests should run fast and ...
Marcin C's user avatar
  • 101
3 votes

Unit testing and other forms of testing

We can pontificate on what is and isn't a unit test for all eternity, seeking to answer this question. Or, we can have a good laugh looking at the images and watching the videos that come up when ...
David Arno's user avatar
  • 39.2k
3 votes

Should tests perform a single assertion, or are multiple related assertions acceptable

I think it's worth keeping in mind that, if you are running tests as part of your development/design loop, it doesn't matter very much how to describe a test failure. You don't need a lot of ...
VoiceOfUnreason's user avatar
3 votes
Accepted

How to control time with API testing?

White-box testing This is why I usually implement an IClock interface in my logic, instead of directly depending on system time (e.g. DateTime.Now). public interface IClock { DateTime GetTime(); ...
Flater's user avatar
  • 48.7k
3 votes

Isolated Integration Tests in Layered Software Architecture Pattern

That is correct. But this doesn't mean that we need to test everything via controllers. Each layer has its own logic and we may have many conditions to test, if we test everything through the highest ...
Stanislav Bashkyrtsev's user avatar
3 votes

Why are logs not used for testing?

Why logs are not utilized for testing? Timestamps. Testing is about verifying expectations. Record a golden log to regression test against and when you run it again in a test all the times are wrong. ...
candied_orange's user avatar

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