Skip to main content

Putting it together: What is Integration Testing?

Let's start by saying that integration testing is looking for information on how two systems work together. That's a little vague, right? A system could be nearly anything. APIs send and get data from databases. That could be entire software products working together like TweetDeck and Twitter. An integration test can be performed anywhere there is a coupling between two software systems.


When that coupling is broken, software becomes a black hole. Customers can submit forms and send data all they want, but it doesn't do any good. FedEx doesn't know that Amazon has packages ready to be shipped from the warehouse to customers that have already paid. Insurance companies can't make decisions about which parts of a healthcare bill they should cover for their customers. 


It is easy for a tester to get a sort of blindness during a release cycle. New features come in one at a time, and sometimes one piece at a time. Testing happens at a granular level. First the API gets tested to see how data is created, updated, deleted, and to get some vague information about the flow of information through the product. Eventually the user interface is wired up and the tester takes a look at look and feel, usability, and probably some cursory testing around submitting forms. In all of this activity, we forget about the bigger picture; how the features work together to make a product, and even more how that product will work with other software in the wild.




Sometimes, doing integration testing means taking a step back. We have to think about how things work together to do integration testing. Instead of thinking in terms of functions like login, and post tweet, there has to be a shift to scenarios a person would use. What happens if someone wants to take a picture, post that to a tweet with some text, and then send the link to a friend for some retweet love? And what happens when one part of those several steps goes wrong?


The tricky part is figuring out exactly where the problem is. If a tweet is posted through the twitter web interface, and that never shows up in TweetDeck, how do we know what went wrong? There is the Twitter API that sends data to other pieces of software, there is the 140 character long string that makes up the tweet, and there is the system consuming and displaying the data. 


A good place to start with troubleshooting this layered problem is with log files. The log files will tell the story of how far the data traveled. If the tweet was never sent from the Twitter interface, there will probably be no trace. But, if it made it to TweetDeck, there will be a trail. Maybe that leads to authentication problems, maybe it leads to misformatted JSON, or maybe a special character in the TweetDeck is angry. Figuring this out without good log files would not be fun.


The Healthcare Challenge


There really is no better example for the importance of integration testing than electronic health record (EHR) systems. Every time a person visits a doctor or a hospital, there is a stack of paperwork that follows them around. There is a form for just about any type of clinical interaction someone would need. This isn't documentation for the sake of documentation. Each form is supposed to give a history, and be a tool for sharing information for other healthcare facilities. EHRs were created to shrink the number of forms needed and to create a universal language between hospitals. One record to rule them all.


The roll outs of course were not that simple. Today there are probably more than 20 different popular EHR systems, not counting the ones healthcare companies created themselves. Each of these stores data in a one way, and sends data out in a completely different way. That sounds bad, but it gets worse. The data captured in these systems gets sent on to insurance and billing companies to see who owes who how much money. Each of these companies wants a specific data type, and sometimes there are restrictions state by state, too.


There is no one medical record to represent each person, there is a mesh of records that come together to represent a person and that gets sliced up a hundred different ways to be useful for anyone that might need the data. Without careful integration -- testing the connection between the EHR, billing companies, and insurance companies -- this all falls over and is useless (but still expensive).





Starting simple can be a good strategy to test the waters


In this healthcare example, a very basic patient record could be a good place to start. What seems like an overly simple test will give up a lot of information about the system. If it 'works', you now know that your product can generate data, generate a file, and that the receiving system can accept and process this file. If it doesn't work, not too much time has been wasted on data setup and hopefully a critical issue has been uncovered.


Assuming the EHR can send data, and the billing system can receive data, this connection is the responsibility of a data file and its contents. These files are expected to be in a special format and also have special types of data. Testing this can be thought of as an exercise in domain testing. Assuming the fields can be tested one at a time, there are ranges of valid and invalid data that need be sent across. For example, a diagnosis field will have a group of diagnoses in the relevant category, everything outside of that category is invalid. The test is seeing what happens when those values are passed across the ether into the billing system.

The important part of integration to remember is that it comes in layers. Software has to be coherent and come together as a product someone would want to use, and then that product will also need to play well with the outside world. Thinking of software testing only in terms of features is a trap. The real value proposition is in how software can communicate with the rest of the world. 

Comments

Popular posts from this blog

Should We Compose a Unit Test or an End-to-End Test?

The disagreement over whether to write a unit test or an end-to-end evaluation for an element of a software system is something I have encountered a number of times. It mostly appears as a philosophical conversation along the lines when we can only write one test for this feature, should we write a unit test or an end-to-end test? Basically, time and resources are limited, so what type of test would be most effective? In this article, I'll provide my view on this question. I must be aware that my experience has been in building software infrastructure for industrial applications -- streaming data system for near-real-time data. For someone who has worked in another domain, where calculating and analysing the whole software process is simpler, or at which the functional environment is more forgiving of mistake, I could understand the way their experience might be different. I've worked on hosted solutions in addition to infrastructure that's installed on-premises and operate

Explore the Basic Types of Software Testing

Software testing is a vital procedure in the IT industry. The method involves testing the features and validating the operation of the program effectively. This is a very important branch of this IT field since any applications created are tested to make sure its effectiveness and proficiency based on its specifications and testing strategies. It also helps to detect any type of defects and flaws in the functioning of the applications which in turn helps the programmer to take the mandatory measure and create software with flawless operation. There are different types of software testing done based on purposes. Every type is this classification relies upon its function and importance in the testing process. There is functional testing that is done in order to test any kind of functional defects in the software and ensure proper operation. Then there is performance testing that is principally done when the software is not functioning correctly.  Under such a situation testing

Test Automation for Mobile Apps: Challenges and Strategies

  Mobile apps are gaining tremendous value in terms of global usage as there are over a million plus mobile app users worldwide. This clearly shows the level of popularity and demand a mobile app has in the global market scenario. The strategic role of software testing in mobile app development ensures that the mobile apps that are being built are used efficiently and seamlessly. The platform of test automation will enhance the mobile app testing process quickly and productively. But, with the efficient conduction of mobile app test automation comes cert ain challenges also, which need to be tackled amicably and pragmatically. In thi s article, you will get to know the challenges in implementing test automation for mobile apps along with subsequent solutions .      The f ollowing are the mobile test automation chal l enges:   1. Different version s of browsers: There are many browsers that are being used for application development, all of which (or some of them ) may have con