前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >机器学习正在改变软件测试的未来

机器学习正在改变软件测试的未来

作者头像
田冠宇
修改2020-12-25 12:02:19
8320
修改2020-12-25 12:02:19
举报
文章被收录于专栏:不能显示专栏创建者

大多数软件开发团队认为他们的测试效果不佳。他们知道质量缺陷的影响是巨大的,因此他们在质量保证上投入了大量资金,但是他们仍然没有得到想要的结果。这不是由于缺乏人才或精力-支持软件测试的技术根本无效。该行业服务不足。

只有对软件进行了正确和彻底的测试,才能发布成功,并且考虑到完成工作所需的时间和人力,测试有时会占用大量资源。这种巨大的需求才刚刚开始得到满足。

机器学习(ML)已经颠覆并改善了许多行业,它才刚刚开始进入软件测试。头脑正在转向,并且有充分的理由:这个行业再也不会一样了。尽管机器学习仍在增长和发展,但软件行业越来越多地采用它,并且随着技术的进步,其影响开始显着改变软件测试的完成方式。

让我们深入研究软件测试的当前状况,回顾机器学习的发展方式,然后探索机器学习技术如何从根本上改变软件测试行业。

软件测试的一些背景

软件测试是检查软件是否按照设计方式执行的过程。功能质量保证(QA)测试是一种确保从根本上解决任何问题的测试形式,它以三种方式执行:单元,API和端到端测试。

单元测试是确保代码块为每个输入提供正确输出的过程。API测试代码模块之间的调用接口,以确保它们可以通信。这些测试是小型,离散的,旨在确保高度确定性的代码段的功能。

端到端(E2E)测试可确保整个应用程序放在一起并在野外运行时可以正常工作。端到端测试测试所有代码如何协同工作以及应用程序如何作为一种产品执行。测试人员将像消费者一样通过核心测试(他们反复测试所做的事情)和边缘测试(他们测试意外的交互作用)来与程序交互。这些测试可以发现应用程序何时未按照客户希望的方式响应,从而使开发人员可以进行维修。

常规的E2E测试可以是手动的也可以是自动化的。手动测试需要人工在每次测试时点击该应用程序。这既费时又容易出错。测试自动化涉及编写脚本来代替人类,但是这些脚本的功能往往不一致,并且随着应用程序的发展需要大量的维护时间。两种方法都很昂贵,并且严重依赖于人类的直觉才能成功。整个E2E测试空间功能失调到足以被AI / ML技术破坏的时机。

什么是机器学习?

虽然机器学习通常是AI的代名词,但它们并非完全相同。机器学习使用算法进行决策,并使用人工输入的反馈来更新这些算法。

机器视觉就是一个很好的例子。机器视觉应用程序可能将某物识别为猫,而实际上却是猫。一个人对其进行纠正(通过告诉它“不,这是一只狗”),并根据该反馈来确定一组事物是猫还是狗的算法。机器学习旨在根据测试人员和用户的持续反馈,随着时间的推移做出更好的决策。

由于缺乏数据和反馈,机器学习一直难以达到E2E测试的世界。端到端测试通常是通过人的直觉构建的,这些直觉是关于什么对测试很重要,或者哪些功能似乎很重要或存在风险。新的应用程序正在使用产品分析数据来告知和改善测试自动化,为机器学习周期打开了大门,从而极大地加快了测试维护和构建的速度。

那么,软件测试的未来是什么?

软件测试的未来是更快的测试,更快的结果,最重要的是,可以学习对用户真正重要的测试。最终,所有测试都旨在确保用户体验出色。如果我们可以教一台机器用户关心的事情,那么我们可以进行比以往更好的测试。

按照惯例,测试在速度和实用性方面都落后于开发。测试自动化通常是工程团队的薄弱环节。ML可以帮助增强实力。

机器学习对未来软件测试的意义是自治。智能机器将能够使用来自当前应用程序使用情况和过去测试经验的数据,无需人工输入即可构建,维护,执行和解释测试。

并非所有软件开发的方面都应该自动化。鉴于E2E测试的悠久传统主要由人的直觉和人力驱

动,整个行业可能最初会拒绝将过程移交给机器。几乎在每个行业中,内部人士都认为机器永远无法完成人类的工作。那些拒绝ML兴起并加倍努力的人经常发现自己落后了。

在测试领域正在发生一个熟悉的故事:机器学习驱动的测试自动化在今天还处于起步阶段,但距离接管整个行业只有几年的时间。

自主的端到端测试

机器学习在端到端测试中的核心优势是能够利用高度复杂的产品分析数据来识别和预测用户需求。ML驱动的测试能够观察Web应用程序上的每个用户交互,了解用户经历的常见(和边缘)过程,并确保这些用例始终按预期工作。

如果该机器正在测试许多应用程序,那么它可以从所有这些应用程序中学习,以预期对应用程序的新更改将如何影响用户体验。借助这些数据,机器学习驱动的测试已经可以比人类建立更好,更有意义的测试。

由ML驱动的自动化开发的测试比由人类建立的测试自动化更快,更便宜地构建和维护。这样的测试可以带来更快(和更高质量)的部署,这对任何VP Engineering的预算都是一个福音。

那测试人员呢?

目前从事这些工作的人呢?

质量工程师在软件开发中仍然扮演着重要角色。确保软件质量的最有效方法是将质量控制嵌入代码本身的设计和开发中。仅存在测试是因为过程不完善。

随着ML从测试工程师那里接管E2E测试的重担,这些工程师可以利用他们的专业知识与软件工程师一起,从头开始构建高质量的代码。从我们自己对此事的访谈来看,似乎大多数质量工程师都宁愿选择这种方法,也不愿整天进行测试维护。

未来看起来光明

ML提供了更简化和有效的软件测试过程。它建立了一个流程,可以更好地处理开发量并创建所需的专业测试。智能软件测试意味着基于数据的测试,准确的结果以及创新的行业发展。

我们希望本文能帮助您为软件测试的未来做好准备,以及机器学习为我们的世界带来的惊人成就。

原文题目:Machine Learning Is Changing the Future of Software Testing

原文:The majority of software development teams believe they don't test well. They understand that the effect of quality defects is substantial, and they invest heavily in quality assurance, but they still aren't getting the results they want. This is not due to a lack of talent or effort -- the technology supporting software testing is simply not effective. The industry has been underserved.

There can't be a successful release until software has been properly and thoroughly tested, and testing can sometimes take significant resources considering the amount of time and human effort required to get the job done right. This gaping need is just beginning to be filled.

Machine learning (ML), which has disrupted and improved so many industries, is just starting to make its way into software testing. Heads are turning, and for good reason: the industry is never going to be the same again. While machine learning is still growing and evolving, the software industry is employing it more and more, and its impact is starting to significantly change the way software testing will be done as the technology improves.

Let's delve into the current state of affairs in software testing, review how machine learning has developed, and then explore how ML techniques are radically changing the software testing industry. Some Background on Software Testing

Software testing is the process of examining whether the software performs the way it was designed to. Functional quality assurance (QA) testing, the form of testing that ensures nothing is fundamentally broken, is executed in three ways: unit, API, and end-to-end testing.

Unit testing is the process of making sure a block of code gives the correct output to each input. API tests call interfaces between code modules to make sure they can communicate. These tests are small, discrete, and meant to ensure the functionality of highly deterministic pieces of code.

End-to-end (E2E) testing makes sure the entire application works when it's all put together and operating in the wild. E2E testing tests how all of the code works together and how the application performs as one product. Testers will interact with the program as a consumer would through core testing (where they test what's done repeatedly) and edge testing (where they test unexpected interactions). These tests discover when

the application does not respond in the way a customer would want it to, allowing developers to make repairs.

Conventional E2E testing can be manual or automated. Manual testing requires humans to click through the application every time it's tested. It's time-consuming and error prone. Test automation involves writing scripts to replace the humans, but these scripts tend to function inconsistently, and require a huge time sink of maintenance as the application evolves. Both methods are expensive and rely heavily on human intuition to succeed. The entire E2E testing space is sufficiently dysfunctional that it is ripe for disruption by AI/ML techniques.

What is Machine Learning?

While machine learning is often used synonymously with AI, they're not strictly the same thing. Machine learning uses algorithms to make decisions, and it uses feedback from human input to update those algorithms.

A good example is machine vision. A machine vision application may identify something as a cat when in fact it is a dog. A human corrects it (by telling it, "no, this is a dog") and the set of algorithms that decide whether something is a cat or a dog update based on this feedback. Machine learning is designed to make better decisions over time based on this continuing feedback from testers and users.

Machine Learning has struggled to reach the world of E2E testing due to the lack of data and feedback. E2E testing is typically built through human intuition about what is important to test, or what features seem important or risky. New applications are using product analytics data to inform and improve test automation, opening the door for machine learning cycles to greatly accelerate test maintenance and construction.

So, What Is the Future of Software Testing?

The future of software testing is faster tests, faster results, and most importantly, tests that learn what really matters to users. Ultimately, all testing

is designed to make sure the user experience is wonderful. If we can teach a machine what users care about, we can test better than ever before.

Conventionally, testing lags development, both in speed and utility. Test automation is often a weak spot for engineering teams. ML can help to make it a strength.

What ML means for the future of software testing is autonomy. Smart machines will be able to, using data from current application usage and past testing experience, build, maintain, execute, and interpret tests without human input.

It's likely that not all aspects of software development should be automated. Given a long tradition of E2E testing being driven primarily by human intuition and manpower, the industry as a whole may initially resist handing the process over to machines. Across practically every industry, insiders contend that machines could never do a human's job. Those who have resisted the rise of ML and doubled down on human labor often find themselves left behind.

A familiar story is unfolding in the world of testing: ML-driven test automation is in its infancy today, but it is likely only a few years away from taking over the industry.

Autonomous End-to-End Tests

Machine Learning's core advantage in E2E testing is being able to leverage highly complex product analytics data to identify and anticipate user needs. ML-driven testing is able to watch every single user interaction on a Web application, understand the common (and edge) journeys that users walk through, and make sure these use cases always work as expected.

If that machine is testing many applications, then it can learn from all of those applications to anticipate how new changes to an application will impact the user experience. ML-driven testing can already build better and more meaningful tests than humans thanks to this data.

The tests developed by ML-driven automation are built and maintained faster and far less-expensively than test automation built by humans. Such testing leads to much faster (and higher quality) deployments and is a boon for any VP Engineering's budget.

What About Testers?

What about the people currently doing these jobs?

Quality engineers still have a major role to play in software development. The most efficient way to assure quality in software is to embed quality control into the design and development of the code itself. Testing only exists because that process is imperfect.

As ML takes over the burden of E2E testing from test engineers, those engineers can use their expertise in concert with software engineers to build high-quality code from the ground up. From our own interviews on the matter, it seems most quality engineers would far prefer this to grinding away at test maintenance all day.

The Future Looks Bright

ML offers a more streamlined and effective software testing process. It establishes a process that's better equipped to handle the volume of developments and create the needed specialized tests. Smart software testing means data-based tests, accurate results, and innovative industry development.

We hope this article has helped prepare you for the future of software testing and the amazing things machine learning has in store for our world.

原文作者:Erik Fogg

原文链接:https://www.technewsworld.com/story/86939.html

翻译人:田冠宇

本文系外文翻译,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系外文翻译前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 软件测试的一些背景
  • 什么是机器学习?
  • 那么,软件测试的未来是什么?
  • 自主的端到端测试
  • 那测试人员呢?
  • 未来看起来光明
  • Let's delve into the current state of affairs in software testing, review how machine learning has developed, and then explore how ML techniques are radically changing the software testing industry. Some Background on Software Testing
  • What is Machine Learning?
  • So, What Is the Future of Software Testing?
  • Autonomous End-to-End Tests
  • What About Testers?
  • The Future Looks Bright
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档