Skip to main content
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
10 votes
Accepted

How to test if my application method handles HTTP status 404 of a REST API without actually calling that REST API

Use a mock. Mock 3rd party API using MockServer or WireMock, if you're in the Java world. Your test will call getNumUsers() method which in turn will call mock of your 3rd API and the mock will ...
dzieciou's user avatar
  • 10.5k
9 votes
Accepted

Tests in CI: Are API + Integration Tests the most suitable?

As already mentioned in your TechBeacon article, teams indeed often spend too much at the top of the test automation pyramid. In general, the pyramid is a good rule of thumb, but (as always) it ...
beatngu13's user avatar
  • 2,142
8 votes
Accepted

How can I use humor to explain integrated testing?

Here are some fun examples: Videos: Doors - https://youtu.be/VPSE13NLPnM Sink - https://youtu.be/RMYRTJuY8Ss Dryer - https://youtu.be/ajUB4-m-y2o Door Lock - https://www.youtube.com/watch?v=...
Michael Durrant's user avatar
7 votes

What is the difference between big bang and top down approach in Integration testing?

In a nutshell, Big bang testing involves real software components after each component has been finished; all of the components have never been tested before. Top down testing involves lower level ...
Yu Zhang's user avatar
  • 9,942
7 votes
Accepted

What's the difference between integration and contract testing of microservices?

Martin Fowler has a good article just about that Quoting him: Integration tests collect modules together and test them as a subsystem in order to verify that they collaborate as intended to achieve ...
Rsf's user avatar
  • 7,089
6 votes

Tests in CI: Are API + Integration Tests the most suitable?

Use the test pyramid as mentioned by Peter Masiar. My contribution here is help answer the question of exactly how to decide the 20% and 80% figures that Peter mentions. My approach to this is to ...
Michael Durrant's user avatar
6 votes

How to test if my application method handles HTTP status 404 of a REST API without actually calling that REST API

You don't need to add any additional dependency. Start doing some preparatory refactoring in order to: Program to an interface instead of a concrete object; Break the getNumUsers() into two ...
João Farias's user avatar
6 votes
Accepted

Writing Integration Tests programmatically vs using Postman for REST APIs

In overall it looks more a question regarding the code-based vs tool-based testing. And for the low-level, technology facing tests, such as integration tests, the code-based approach would give you: ...
501NotImplemented's user avatar
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
6 votes

Measuring integration test efficiency

We thought of some sort of limited coverage measurement - checking if collaboration points like app to database, app to external service are covered by tests. Most code coverage tools allow filtering ...
João Farias's user avatar
6 votes
Accepted

Integration tests fail due to external components... but code needs to be merged to main

I don't think it's appropriate for your build pipeline to rely on an external service that could gate your ability to build and deploy changes. Let's take an extreme example. Your CI/CD pipeline gates ...
Thomas Owens's user avatar
  • 1,581
5 votes
Accepted

Difference between Integration Testing and Continuous Integration Testing

Integration Testing Integration testing is about taking the units of code developed with unit testing and combine them together into the desired system. It (can) also mean testing software by ...
Michael Durrant's user avatar
5 votes

Tests in CI: Are API + Integration Tests the most suitable?

Consider test pyramid. Using Pareto principle (also known as 80/20 rule), you can get 80% of benefits from testing by focusing on unit test with 20% of the effort. And 80% benefit of the remainder if ...
Peter M. - stands for Monica's user avatar
5 votes

Who is typically responsible for integration testing?

The one and only correct answer to this question do not exist. It depends on many factors. It depends on the software development life cycle model, on the team and developer to tester ratio and so on. ...
mdymek's user avatar
  • 469
5 votes
Accepted

Code coverage for Integration tests

Some relevant guidelines: The goal is confidence, not coverage. If you have good coverage with well-written unit tests then a tiny number of high-level tests can be enough to have confidence that the ...
l0b0's user avatar
  • 468
4 votes
Accepted

Seriously struggling to understand "integration" testing

Let's start from your initial mandate. "Automated testing" can be a pretty vast land to explore. Leave the unit tests as they are for now and focus on the doubts you are having for integration tests. ...
gumol's user avatar
  • 164
4 votes

Seriously struggling to understand "integration" testing

Some people distinguish between integration (some parts are used for real, some are mocked) and system/end-to-end testing (where is no mocking at all). For other people, system, integration , and ...
Peter M. - stands for Monica's user avatar
4 votes

Writing Integration Tests programmatically vs using Postman for REST APIs

I used to write integration tests in Postman and after a couple of tens of requests, it became very difficult to maintain. Mostly because: accessing other resources like a DB was hard it was hard to ...
pavelsaman's user avatar
  • 4,548
3 votes
Accepted

What does Automated Integration Testing look like?

The traditional test levels (unit/integration/system/… testing) usually do not make a statement about how the technical implementation takes place. Choosing a proper test interface is almost always a ...
beatngu13's user avatar
  • 2,142
3 votes

Difference between Integration Testing and Continuous Integration Testing

In a nutshell: Continuous integration (CI): continuously integrate (small) software changes. Continuous delivery (CD): continuously deliver these changes. Continuous testing (CT): continuously test ...
beatngu13's user avatar
  • 2,142
3 votes

Is it a good practice to run functional tests with coverage?

First of all, coverage isn't coverage. There're several coverage criteria, but most used are: Function coverage – Has each function (or subroutine) in the program been called? Statement ...
beatngu13's user avatar
  • 2,142
3 votes

How to automate multiple selenium test cases where one test case is dependent with another test case?

You can try someting like, Option 1 Open browser. Open Base URL. Scenario 1 Go to Login page. Enter the username and password. Login. Lands on the Home Page/Dashboard/Whatever. Scenario 2 ...
IAmMilinPatel's user avatar
3 votes

What is the difference between big bang and top down approach in Integration testing?

In Bigbang Approach, the entire project or system is completed, and the testing is done on the entire system. In Top Down approach, the developers develop higher level components first. To test ...
Rishi's user avatar
  • 885
3 votes

Assertion on static value or calculated one

I would consider the whole idea of verifying such logic from the UI perspective as a bad practice. See info on test pyramid. If you need to test the calculation logic of your service - you can do ...
501NotImplemented's user avatar
3 votes

How is compatibility of business logic tested in microservices?

By the book, microservices business logic are independent from each other - built around business capabilities. This is achieved by defining bounded contexts (check it here, here, and here). It means ...
João Farias's user avatar
3 votes

Measuring integration test efficiency

Can you detail why you need those metrics? It sounds like you just want to have metrics - but do you have any plan with them afterwards? Personally, I'd first focus on getting the integration tests on ...
FDM's user avatar
  • 5,894
3 votes
Accepted

Unit testing for a non-atomic function if all atomic components have been tested

Unit tests are about checking the public API of a function. In the function below, what matters is input and output. The rest are details that should be mostly hidden in your tests. def non-atomic(...
João Farias's user avatar
2 votes

Testing Different User Setting's Effects On a Page

I would have 4 types of tests: unauthenticated functionality authentication ('login') tests for happy and sad paths tests for content for user type 1 (admin?) tests for content for user type 2 (...
Michael Durrant's user avatar

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