自动化失败的6种原因

目录

摘要

内容

1. People don’t understand what to automate (and what not to automate)人们不明白要自动化什么(以及什么不能自动化)

2. The team doesn’t have technically skilled people团队没有技术熟练的人员

3. There’s low visibility around automation自动化的可见性很低

4. Applications are not easily testable应用程序不易测试

5. The goals of automation are vague自动化的目标含糊不清

6. The team doesn’t have good processes to handle automation tasks团队没有良好的流程来处理自动化任务


摘要

No matter what the domain or company, there are some common problems that always tend to affect new automation projects. Here are six top reasons automation projects can fail. Keeping these pitfalls in mind will help you to avoid them and instead build stable automation frameworks, making the endeavor a collaborative experience so that your whole team owns automation.

无论是什么公司,都有一些常见的问题,总是会影响新的自动化项目。 以下是自动化项目可能失败的六个主要原因。 牢记这些陷阱将帮助您避免它们,会帮助您建立稳定的自动化框架,使它成为一种协作体验,以便您的整个团队拥有自动化。

内容

Teams and organizations often get excited when they hear the word “automation.” It’s like a new gadget that everyone wants a piece of—at first. But after a month or two, no one cares, and we shift our focus to other gadgets or, in this case, other project priorities and developments.

当团队和组织听到“自动化”这个词时,他们常常会兴奋起来。这就像是它是一个每个人都想要的新工具。 但在一两个月后,没有人关心,我们将注意力转移到其他小工具上,或者在这种情况下,将其他项目优先事项和发展重点转移。

In order for automation to be successful instead of just a flash in the pan, companies need to approach it with realistic goals, the right attitude, and a willingness to make it work.

为了使自动化成功而不仅仅是昙花一现,公司需要以现实的目标,正确的态度和意愿使其发挥作用来实现自动化。

It is interesting to note that, no matter what domain or company I’ve worked for, there were some common problems that always affected automation projects. Here are six top reasons I’ve consistently seen automation projects fail. Keeping these pitfalls in mind will help you to avoid them and instead build stable automation frameworks, making the endeavor a collaborative experience so that the whole team owns automation.

有趣的是,无论我工作的领域或公司是什么,都存在一些常见的问题,这些问题总是会影响自动化项目。 以下是我一直看到自动化项目失败的六个主要原因。 牢记这些缺陷将帮助您避免它们,而是建立稳定的自动化框架,使努力成为一种协作体验,以便整个团队拥有自动化。

1. People don’t understand what to automate (and what not to automate)人们不明白要自动化什么(以及什么不能自动化)

It is really important to understand what to automate and what not to automate.

了解什么要自动化,什么不需要自动化是非常重要的。

Say you have a webpage. It is good to automate the different functionalities of the webpage, but it may be a bad idea to use automation to check rendering issues or location of elements on the page. This is because it is hard to know how the screen displays in different form factors due to so many different devices, browsers, and screen sizes. Also, if you start using x,y coordinates to verify element location on the page, the tests can become flaky when run on different screen sizes and resolutions. These scenarios are better off tested manually by human testers.

假设你有一个网页。 自动化网页的不同功能是很好的,但使用自动化来检查页面上的渲染问题或元素位置可能是个坏主意。 这是因为由于许多不同的设备,浏览器和屏幕尺寸,很难知道屏幕如何以不同的形状因子显示。 此外,如果您开始使用x,y坐标来验证页面上的元素位置,则在不同的屏幕尺寸和分辨率下运行时,测试会变得不稳定。 这些场景最好由人类测试人员手动测试。

We always want to automate something that is stable, that is less prone to change, that has to be repeated multiple number of times, or that will help save valuable testing effort. By automating mundane and repetitive tasks, testers can spend their valuable testing effort on performing exploratory testing.

我们总是希望自动化一些稳定的,不易变化的东西,必须重复多次,或者这将有助于节省宝贵的测试工作。 通过自动执行平凡和重复的任务,测试人员可以将宝贵的测试工作用于执行探索性测试。

2. The team doesn’t have technically skilled people团队没有技术熟练的人员

Doing automation the right way requires testers to have a certain level of technical expertise. That being said, getting skilled people who have sufficient technical knowledge can be expensive and time-consuming. Not many companies, like start-ups, for example, can afford to hire automation engineers.

以正确的方式进行自动化需要测试人员具备一定的技术专业知识。 话虽如此,拥有足够技术知识的技术人员可能既昂贵又耗时。 例如,像初创企业这样的公司可以负担得起雇佣自动化工程师的费用。

It would be worthwhile to hire a few technical testers who can kick-start automation projects and train others on the team to get involved in the automation effort. If that’s not an option, you can always invest in a tool that can help anyone do automation, irrespective of technical expertise. 

聘请一些技术测试人员是值得的,他们可以启动自动化项目并培训团队中的其他人参与自动化工作。 如果这不是一个选项,您可以随时投资一个可以帮助任何人进行自动化的工具,而不管技术专长。

3. There’s low visibility around automation自动化的可见性很低

I’ve often seen teams where two to five people are in charge of automation and no one else has any clue of what is going on in terms of the automation efforts. This lack of visibility sets you up for failure because no one is going to take your work seriously, especially if you are not able to let people know how your efforts help to solve testing problems and provide value.

我经常看到团队中有两到五个人负责自动化,没有人知道自动化工作的进展情况。 缺乏可见性会导致您失败,因为没有人会认真对待您的工作,特别是如果您无法让人们了解您的工作如何帮助解决测试问题并提供价值。

Fortunately, there are some easy ways to make your automation visible:幸运的是,有一些简单的方法可以使您的自动化可见:

  • Create an automation wiki page with information such as what features are being automated, what modules are being covered, and how your automation framework is set up创建一个自动化Wiki页面,其中包含哪些功能正在自动化,所涵盖的模块以及自动化框架的设置方式等信息
  • Make the results of your automation visible to the whole team via email notifications and dashboards, and discuss the progress in daily stand-ups and other team meetings通过电子邮件通知和仪表板向整个团队显示您的自动化结果,并讨论每日站立和其他团队会议的进度
  • Hold lunch-and-learn sessions covering different trends, good practices, and tools related to automation举办午餐和学习会议,涵盖与自动化相关的不同趋势,良好实践和工具

It is important to make automation a collaborative effort and involve the whole team in planning and writing it.将自动化作为一项协作工作并让整个团队参与规划和编写是非常重要的。

4. Applications are not easily testable应用程序不易测试

Teams do not often pay attention to the testability of their software. What do I mean by that? If you build an application, you also need to make sure it is easily testable from the unit level, system level, integration level, and acceptance level.

团队通常不会关注其软件的可测试性。 那是什么意思? 如果您构建应用程序,还需要确保它可以从单元级别,系统级别,集成级别和接受级别轻松测试。

When you neglect this aspect, we end up having an application that is almost impossible to test from any level. Then we think automation is not working for the team, when the real problem is that some of the developers are building applications that are too complex and not testable.

当你忽视这个方面时,我们最终会得到一个几乎不可能从任何级别进行测试的应用程序。 然后我们认为自动化不适用于团队,而真正的问题是某些开发人员正在构建过于复杂且无法测试的应用程序。

Ensure you discuss the testability of a story, a feature, and requirements during backlog grooming and the sprint planning meeting, before the development effort starts on a feature. This will help to prevent problems later in the development lifecycle.

确保在开发功能开始之前,在积压修饰和sprint计划会议期间讨论故事,功能和要求的可测试性。 这有助于在开发生命周期的后期防止出现问题。

5. The goals of automation are vague自动化的目标含糊不清

We start with the goal of building a robust automation framework that seamlessly integrates with the CI/CD pipeline, is maintainable, and runs in a stable and consistent way, giving quick feedback about the application. All these objectives are good on paper, but to get to this level of maturity, we need to start small.

我们的目标是构建一个强大的自动化框架,该框架可与CI / CD管道无缝集成,可维护,并以稳定一致的方式运行,提供有关应用程序的快速反馈。 所有这些目标在纸面上都是好的,但要达到这种成熟水平,我们需要从小做起。

This is where most automation projects fail: They start doing something complex with automation and end up having to refactor the entire framework after they are not getting the necessary value from it. This leads to wasting time, cost, and effort.

这是大多数自动化项目失败的地方:他们开始做一些复杂的自动化,最终不得不重构整个框架,因为它们没有从中获得必要的价值。 这导致浪费时间,成本和精力。

Start by identifying two or three high-level functionalities that are stable, and automate them first. Based on this, collect feedback on what went well and what did not. Then, once these tests run consistently and are stable, start identifying other tests to add.

首先确定两个或三个稳定的高级功能,然后首先实现自动化。 在此基础上,收集有关哪些进展顺利,哪些进展顺利的反馈。 然后,一旦这些测试一直运行并且稳定,就开始识别要添加的其他测试。

It is also important to separate your automation suite into smoke tests and regression tests. Smoke tests would be the tests that run after every code check-in. They should typically finish running within five minutes to get quick feedback on new code changes. A regression test suite can run on a daily basis and covers different functionalities of the application. Your needs may vary based on the context of the project, but this is one approach that has worked well for me.

将自动化套件分为烟雾测试和回归测试也很重要。 Smoke测试将是每次代码签入后运行的测试。 它们通常应在五分钟内完成运行,以便快速获得有关新代码更改的反馈。 回归测试套件可以每天运行,并涵盖应用程序的不同功能。 您的需求可能会根据项目的背景而有所不同,但这种方法对我来说效果很好。

6. The team doesn’t have good processes to handle automation tasks团队没有良好的流程来处理自动化任务

This is one of the most common problems with test automation: There is no proper process in place to handle automation tasks. Each team member has their own interpretation of the process, leading to chaos and failure of the automation project.

这是测试自动化最常见的问题之一:没有适当的流程来处理自动化任务。 每个团队成员都有自己对流程的解释,导致自动化项目的混乱和失败。

The process of automation should be streamlined and clearly defined right from the start to the finish of the lifecycle of a story. There should be no ambiguity about who has to do what and when during the software development lifecycle. Treat automation tasks as separate stories, just like how we implement different features as part of stories. This helps the team respect the automation tasks and makes them much easier to manage. Finally, make this process visible to the whole team by writing the steps on white boards and as checklists in stories, and constantly remind the team about them in the daily stand-ups and other team meetings.

从故事生命周期的开始到结束,应简化并明确定义自动化过程。 在软件开发生命周期中,谁应该做什么以及什么时候应该没有歧义。 将自动化任务视为单独的故事,就像我们将不同的功能作为故事的一部分实现一样。 这有助于团队尊重自动化任务并使其更易于管理。 最后,通过在白板上编写步骤和故事中的清单,使整个团队可以看到此过程,并在每日站立和其他团队会议中不断提醒团队。

Keeping these six common reasons for failure in mind will help you proactively avoid them when implementing an automation effort with your team

记住这六个常见的失败原因将有助于您在与团队实施自动化工作时主动避免这些原因

发布了397 篇原创文章 · 获赞 445 · 访问量 82万+

猜你喜欢

转载自blog.csdn.net/wodeyijia911/article/details/99881813