Software-Testing-Anti-Patterns

Software Testing Anti Patterns

Since the dawn of computers, we’ve always had to test software. Over the course of several decades, the discipline of software testing has seen many best practices and patterns. Unfortunately, there are also several anti patterns that are present in many companies.

An anti pattern is a pattern of activities that tries to solve a certain problem but is actually counter-productive. It either doesn’t solve the problem, makes it worse, or creates new problems. In this article, I’ll sum up some common testing anti patterns.

Only Involving Testers Afterwards

Many companies only involve the testers when the developers decide a feature is done. The requirements go to the developers, who change the code to implement the requested feature. The updated application is then “thrown over the wall” to the testers. They will then use the requirements to construct test cases. After going through the test cases, the testers will often find all sorts of issues so that the developers need to revisit the new features. This has a detrimental effect on productivity and morale.

Such an approach to testing is used in many companies, even those that talk about modern practices like Agile and DevOps. However, “throwing things over the wall” without input from the next step goes against the spirit of Agile and DevOps. The idea is to have all disciplines work together towards a common goal.

Testing is about getting feedback, regardless of whether it is automated testing or not. So of course you have to test after the feature has been developed. But that doesn’t mean you can’t involve your QA team earlier in the process.

Having testers involved in defining requirements, identifying use cases, and writing tests is a way to catch edge cases early and leads to quality tests.

Not Automating When You Can

Tests that run by the click of a button are a huge time saver, and as such they also save money. Any sufficiently large application can have hundreds or even thousands of automated tests. You can’t achieve efficient software delivery if you’re testing all this manually. It would simply take too much time.

One alternative I’ve seen is to stop testing finished features. But due to the nature of software, existing features that used to work can easily break because of a change to another feature. That’s why it pays off to keep verifying that what used to work still works now.

The better alternative to manual testing is to automate as many tests as you can. There are many tools to help you automate your tests. From the low level of separate pieces of code (unit tests) over the integration of these pieces (integration tests) to full-blown end-to-end tests.

As a tester, you should encourage the whole team to be involved in manual testing. It will encourage them to write code that is fit for automated tests. Help developers write and maintain automated tests. Help them identify test cases.

Expecting to Automate Everything

As a counterargument to my previous point, be wary of trying to automate every aspect of testing. Manual testing can still have its place in a world where everything is increasingly automated.

Some things could be too hard or too much work to automate. Other scenarios may be so rare that it isn’t worth automating, especially if the consequences of an issue are acceptable.

Another thing you can’t expect to automate is exploratory testing. Exploratory testing is where testers use their experience and creativity to test the application. This allows the testers to learn about the application and generate new tests from this process. Indeed, in the words of software engineering professor Cem Kaner, the idea behind exploratory testing is that “test-related learning, test design, test execution, and test result interpretation [are] mutually supportive activities that run in parallel throughout the project.”

Lack of Test Environment Management

Test Environment Management spans a broad range of activities. The idea is to provide and maintain a stable environment that can be used for testing.

Typically, we call such an environment a testing or staging environment. It’s the environment where testers or product owners can test the application and any new features that the developers have delivered.

However, if such an environment isn’t managed well, it can lead to a very inefficient software delivery process. Examples are:

●  Confusion over which features have already been deployed to the test environment.

●  The test environment is missing certain critical pieces or external integrations so that not everything can be tested.

●  The hardware differs significantly from the production environment.

●  The test environment isn’t configured correctly.

●  Lack of quality data to test with.

Such factors can lead to a back and forth discussion between testers, management, and developers. Bugs may go unnoticed or reported bugs may not be bugs at all. Use cases may be hard to test and bugs reported in production hard to reproduce.

Without a good test environment management, you will be wasting time and losing money.

Unsecured Test Data

Most applications need a set of data to test certain scenarios. Not all data is created equal though. With modern privacy laws, you want to avoid using real user data. Both developers and testers often have to dig in the data of the test environment to see what is causing certain behavior. This means reading what could be personally identifying information (PII). If this is data from real users, you might be violating certain laws.

Moreover, if your software integrates with other systems, the data may flow away from your system to a point where it is out of your control. Maybe even to another company. This is not something you want to do with real people’s data. Security breaches can lead to severe public image and financial losses or fines.

So you want either made up data or obfuscated / secured data. But you also want to make sure that the data is still relevant and valid in the context of your application. One possible solution to this is to generate the data your tests need as part of your tests.

Not Teaching Developers

The whole team owns the quality of the software. Pair with developers and teach them the techniques so that they can test the features as they finish them.

This is especially important in teams that (aspire to) have a high level of agility. If you want to continuously deploy small features, the team will have to continuously test the application. This includes developers, instead of having them wait for the testers.

In such a case, the role of testers becomes more of a coaching role.

If testers and developers don’t work together closely, both will have negative feelings for each other. Developers will see the testers as a factor blocking them from moving fast. Testers will have little faith in the capacity of the developers to deliver quality software.

In fact, both are right. If the two groups don’t collaborate, precious time and effort will be lost in testing a feature, fixing bugs, and testing the feature again. If the developers know what will be tested, they can anticipate the different test cases and write the code accordingly. They might even automate the test cases, which is a win for testers and developers.

Streamline Your Testing!

The major theme in this article is one of collaboration. Testers and developers (and other disciplines) should work together so that the software can be tested with the least amount of effort. This leads to a more efficient testing process, fewer bugs, and a faster delivery cycle. Top that off with good test environment management (which is also a collaborative effort) and secure data, and you have a winning testing process.

Author Peter Morlion

This post was written by Peter Morlion. Peter is a passionate programmer that helps people and companies improve the quality of their code, especially in legacy codebases. He firmly believes that industry best practices are invaluable when working towards this goal, and his specialties include TDD, DI, and SOLID principles.

Configuration-Management-Heart-of-ITIL

Why Configuration Management Is at the Heart of ITIL

For many organizations, IT starts small and grows. They don’t plan out how their IT organization will interact with the rest of the business. Instead, they hire a person or two to handle a few computers and maybe set up a server. Over time, those roles grow alongside the business. Eventually, IT leadership recognizes that the business needs more out of the IT organization than what they’re providing. Sometimes it’s because customers aren’t able to get the hardware or software they need.

Whatever the cause, many organizations come to realize that their IT organization just isn’t cutting it.

In lots of instances, those organizations choose to use ITIL, the IT information library.

What’s ITIL?

In the 1980’s, the British government established the IT information library. In the decades since, they’ve updated it repeatedly. It defines a series of best practices that aid IT organizations in delivering high-quality IT solutions to their business. ITIL is actually a very big set of guidelines. The original library was more than thirty books! Even though it’s changed many times throughout the years, ITIL still has a core focus on some key principles. What’s top among those principles is the idea that IT organizations should focus on providing value, work iteratively, and start from where they are.

This means that organizations shouldn’t have to drastically re-organize the way they do business to adopt ITIL best practices. Instead, they should look at how they’re providing value already. They should then identify ways they can provide more value to the business, and implement those changes over time, a little bit at a time. Short, achievable goals can mean that the business entities who rely on the IT organization see constant improvement, instead of waiting for big, difficult projects that may or may not deliver.

A common early step in this process is to implement a configuration management database.

What’s Configuration Management?

Configuration management is the process of storing information about the IT resources within your organization in a centralized repository. Usually, this takes the form of a relational database. As the name implies, you also store information about the configuration of the system inside that database.

Starting your configuration management project can feel a bit like you’re starting in the deep end. Even in businesses with less than 100 employees, it’s likely you have a lot of IT resources. To do configuration management right, you need to find every one of those resources! That said, you should plan to treat creating a configuration management database like any other project. Plan how you’ll undertake asset discovery. Evaluate options for the configuration management database software. Define a realistic picture of success. Then, put that plan into action, and execute it to completion.

How Does Configuration Management Highlight Value of Your Assets?

As noted, configuration management takes all the information about your business’s IT assets and brings them to one place. This is a benefit. When you have information that’s spread out in multiple silos, it’s difficult to find it what you need. If a critical system needs to be replaced, it’s a lot easier to fix it when you know how it’s supposed to be configured. A breakdown in a critical system is much easier to fix when you know how that system works.

Configuration management projects bring additional benefits to IT organizations. It’s common for IT leadership to discover assets they didn’t know existed during the asset discovery phase of a configuration management project. Usually, these assets were quietly doing their jobs, but they were unsupported by IT. IT organizations discover these business-critical assets haven’t received updates in years. This is a serious security risk. Identifying those assets and establishing a proper support plan is one way configuration management is a great side effect of configuration management projects.

How Does Configuration Management Optimize the Value of Your Assets?

Another way that configuration management provides value is by optimizing your IT assets. Once you know where all your IT assets are and how they’re performing, you can standardize on optimal configurations for all of your assets. Configuration management means you know which laptops perform the best for which employees. It’s easy to spot which servers have non-standard configurations when all your configurations are in a single place. Your IT organization can provide value by helping your users get the most out of their systems by standardizing on high-performance configurations.

Finally, IT organizations can minimize the amount of time they spend keeping systems up to date. With standard configurations on all systems, activities, like applying patches, are a one-step process. That means your business is more secure while your IT organization spends less time updating systems.

How Can We Make Configuration Management Successful?

Even though the goal of configuration management is to store all of the information about your IT assets in one place, the project doesn’t need to be monolithic. You can approach it piecemeal. Instead of trying to gather information about every asset across the whole company, focus on one division at a time. Work with the employees there to identify IT assets and how those assets are configured. Once you’ve done this, train those employees to work with the configuration management system. This means that when they need to change configurations or add new systems, they’ll know how to work with your IT team.

This kind of iterative approach pays off in more ways than one. Not only will you break the project into manageable chunks, but you’ll also learn along the way. It’s guaranteed that you’re going to do some things wrong at first. Instead of doing all those things wrong across the whole organization, you can limit your mistakes to just a few employees. Those employees will be able to provide feedback to your team, and that feedback will mean that your project will do better. This ties into one of the core principles of ITIL, which is being iterative in your processes. You should learn from each step of your implementation to make the next one better.

Another way to be successful is to pick high-quality software. When you centralize your configurations, you want to use software that’s simple and straightforward. Choosing a quality implementation platform like Enov8 will save your team hundreds of hours and make the software easier to use for your business.

How Is Configuration Management the Heart of ITIL?

Good configuration management plays directly into the values that are at the heart of ITIL. It not only provides value to the business, but it makes life easier for IT employees too. You can approach configuration management as an iterative process, implementing it one step at a time. That might start with a basic database that tracks laptops and servers, and wind up with a system that tracks items all the way down to the component level. The heart of ITIL is that your team makes those choices.

ITIL isn’t a monolith. The goal isn’t to say that every organization should implement each part of the system. And at no point should you expect that everyone will implement each system in the same way. You should optimize the implementation for what your business needs. Your first step will always be sitting down with stakeholders in your business and determining what will work best for your team and theirs. That’s the heart of ITIL, and good configuration management is one step on the way to making your IT organization better for everyone.

Author Eric Boersma

This post was written by Eric Boersma. Eric is a software developer and development manager who’s done everything from IT security in pharmaceuticals to writing intelligence software for the US government to building international development teams for non-profits. He loves to talk about the things he’s learned along the way, and he enjoys listening to and learning from others as well.

Failed Service

5 Reasons IT Service Management is Failing

Today’s IT organizations are busier than ever. They process more data, employ more people, and empower more businesses than at any other time in history. This growth in IT power and responsibility highlights the necessity that IT organizations build upon good processes. Many organizations turn to ITIL and IT service management to provide structure to their IT organization. While ITIL is a terrific framework for managing IT organizations, it’s not a silver bullet. Simply knowing about ITIL and using it to structure your IT organization isn’t enough to ensure success.

If you’re concerned that your IT service management processes might be failing your team or your business, read on. I’ve laid out five red flags that will help you detect if IT service management is failing.

#1: You’re Not Properly Scoping Changes

A common mistake among IT organizations is failing to set realistic targets for success of new processes. This can take several different forms. All of them are quite damaging to your business.

One form is scoping that may be insufficiently measurable. For instance, leadership doesn’t provide any specific targets but merely sets a goal that things will “get better.” A goal that relies on relative measures of success like “getting better” means measurement will be subjective. Subjective measurements involve the perception of stakeholders, which can be easily swayed by variations in day-to-day service. You don’t want the business to perceive your team as failing because the CTO’s laptop just happened to have a faulty hard drive the day before an organizational review of Service Management objectives.

Another form is scoping that’s too ambitious. An example might be an IT service manager setting a service level agreement that says you’ll resolve all incidents in one hour. That’s not a realistic timeline. Setting unrealistic timelines for employees degrades morale and makes those goals seem meaningless.

The opposite problem can also be trouble for an IT organization. It’s no good to set goals that won’t accomplish anything at all. Setting a goal that’s too loose means your organization won’t need to change to improve and will fail to provide value to the business.

#2: You’re Using the Wrong Tools

While ITIL is primarily focused around creating good processes for your IT organization, tooling is still very important. Regardless of your role in your business’s IT organization, you need the right information at the right time to do your job. High-quality IT service management software is regularly underrated as a part of a good IT service management implementation. It’s not just about getting the right information to the right people. It’s also about making sure that software is easy to use for business users. An effective IT service management implementation puts customers in a position to succeed, even when other parts of the IT organization are failing.

One way to identify failing tools is by looking for common pain points. Spend some time with key users of your IT service management software. Do they regularly have a hard time finding things? Is their time spent trying to make sure they don’t “mess up” the software? Does the software itself suffer regular outages?

If you suspect that your IT service management tools aren’t living up to their promises, you might want to check out a new platform like Enov8. You may find that you can easily cover gaps in your processes with software instead of painful changes on the process side.

#3: You’re Thinking About Incidents Wrong

One way IT service management systems regularly fail their users is by focusing too much on fixing problems. I know, that seems like an odd response. The truth is that sometimes IT organizations can focus too much on fixing their own problems over solving problems for the business.

IT organizations regularly think about incidents as engineering problems while users think about them as an inability to get work done. I really like the analogy of a broken light bulb. An IT organization sees the broken light bulb as the problem. The business doesn’t see it that way. Instead, they feel that the problem is that they’re trying to work in the dark. Engineers might spend days trying to get a new light bulb to users while a much simpler fix would simply be to open the window shades.

IT service management works best when it focuses on delivering the results the business needs. Often times, that requires quality engineering, but it should never be the primary concern. If your team looks at a new incident and immediately jumps to figuring out the technical cause, your IT service management implementation is probably failing. Focus first on fixing the problem for the business before trying to fix the root cause.

#4: Your Processes Are Too Complicated

IT service management is about putting processes into place in order to solve problems for the business. This is a worthy goal! Unfortunately, lots of times organizations lose that vision in the day-to-day running of the team. Something goes wrong as part of incident response, so they add a new step to a process. That new step for the process solves one problem but creates another problem that isn’t immediately apparent. When a problem crops up from that new change, the team adds another step.

You can see where this is going. In trying to fix lots of little problems encountered by your IT service management implementation, you’ve created one big one. Your processes have become much too complicated. The consequences of over-complicated processes are numerous. Employees don’t know what to do while dealing with problems. Management can’t easily understand the state of any given incident’s response. The business is stuck suffering from open issues. Resist the urge to add a new part of the process every time you encounter a problem. If you’re in the habit of doing this, look for what steps of the process you can remove to simplify it.

#5: You’re Not Focused on People

ITIL books and training focus a lot on processes and systems. That’s necessary because people writing books or designing training don’t know the people in your business. But the truth of the matter is that those people are the reason for IT service management. The goal is to make their lives easier. It’s not about implementing a specific process or creating the perfect architecture.

At the end of the day, the true measure of success is whether your IT organization makes working for your business better. Successful IT service management implementations spend a lot of time thinking about their users. They talk with them and listen to the problems those users are facing. Unsuccessful implementations get bogged down by worrying about metrics and tweaks to the process.

The Hardest Part is Recognizing the Problem

Most IT service management implementations don’t fail because of malice. They don’t fail because of incompetence on the part of the team. Those implementations fail because the team didn’t recognize the warning signs of failure before it became entrenched within their system. The IT organizations pursued their implementation with the best of intentions but didn’t know they were headed toward failure. If you recognize some of these issues within your organization, it’s not too late to start fixing them. It’ll require diligence and critical thinking, but you can absolutely be successful.

Author Eric Boersma

This post was written by Eric Boersma. Eric is a software developer and development manager who’s done everything from IT security in pharmaceuticals to writing intelligence software for the US government to building international development teams for non-profits. He loves to talk about the things he’s learned along the way, and he enjoys listening to and learning from others as well.