AI和测试自动化的真相

目录

翻译内容

De-Mystifying Artificial Intelligence 去神秘化的人工智能

Influence of AI in Test Automation AI在测试自动化中的影响

Faster and More Stable UI Tests 更快,更稳定的UI测试

Reducing Maintenance and Eliminating Flaky Tests 减少维护和消除不稳定测试

Continuous Learning from Production Data 从生产数据中不断学习

Removing Dependencies 删除依赖项

Ease of Authoring and Executing Tests 易于编写和执行测试

Releasing at the Speed of Development 加快研发速度

关于作者

原链接


翻译内容

Software testing has gradually evolved in the past few decades. In the past, teams were accustomed to the waterfall methodology: Everything was sequential, from requirements to product deployment.

软件测试在过去几十年中逐渐发展。 在过去,团队习惯于瀑布方法:从需求到产品部署,一切都是顺序的。

Only after the development phase was completed did the testers got their hands on the product. Historically, testers would find a number of bugs in this phase, and it would take a lot of redesign and rework to fix them. This resulted in a lot of wastage, from time to effort and cost, plus team morale.

只有在开发阶段完成后,测试人员才能获得产品。 从历史上看,测试人员会在此阶段发现许多错误,需要进行大量的重新设计和返工才能修复它们。 这导致了大量的浪费,从时间到精力和成本,再加上团队士气。

But in the current state of testing, most companies are following Agile processes, such as XP, Scrum, Kanban, or some variation of these. The main goal is to find bugs fast, fix them quickly, and release software faster.

但在当前的测试状态下,大多数公司都在遵从敏捷流程,例如XP,Scrum,看板或其中的一些变体。 主要目标是快速发现缺陷,快速修复缺陷并更快地发布软件。

In order to achieve this goal, there is a huge need to complement the already existing manual testing process with automated testing. This is a vital component of Continuous Integration (CI), Continuous Delivery (CD), and DevOps, which most teams are now following to make their Software Development Life Cycle (SDLC) process more lean and effective.

为了实现这一目标,通过自动化测试来补充现有的手动测试过程,这是十分必要的。 这是持续集成(CI),持续交付(CD)和DevOps的重要组成部分,大多数团队正在遵循这些,使其软件开发生命周期(SDLC)流程更加精简和有效。

Various tools and frameworks have evolved in the past decade to help with automated testing, but one approach worth talking about is the use of Artificial Intelligence (AI) in test automation.

在过去十年中,各种工具和框架已经发展,以帮助进行自动化测试,但值得讨论的一种方法是在测试自动化中人工智能(AI)的使用。

AI test automation

De-Mystifying Artificial Intelligence 去神秘化的人工智能

Let’s first take a step back and de-mystify AI. At its most basic level, AI is a technology that can comprehend, sense, and learn, and use computers to solve problems typically requiring human intelligence and understanding.

让我们先退后一步,让AI去神秘化。 在最基本的层面上,AI是一种能够理解,感知和学习的技术,并且使用计算机来解决通常需要人类智能和理解的问题。

Another way of looking at it is, AI applies human skills and tendencies to inanimate objects or ideas. Much like automation, AI makes it possible for technology to complete real human tasks.

另一种看待它的方式是,AI将人类技能和倾向应用于无生命的物体或想法。 与自动化非常相似,AI使技术可以完成真正的人工任务。

Contrary to popular opinion, AI is neither a distant reality nor a concept based on the plots of science fiction; instead, it has infiltrated the technology scene and is fueling the innovations that touch our daily lives. From chat bots posing as customer service representatives to search results and traffic predictions, on any given day, AI is all around us.

与流行观点相反,人工智能既不是遥远的现实,也不是基于科幻小说的概念; 相反,它渗透了技术领域,并推动了触及我们日常生活的创新。 从作为客户服务代表的聊天机器人到搜索结果和流量预测,在任何一天,人工智能就在我们身边。

Here are some mind blowing statistics about AI adoption: 以下是关于AI使用的一些令人兴奋的统计数据

  • According to a recent study by Narrative Science, 61% of businesses implemented AI in some way in 2017. The adoption rate is only growing in 2018.  根据Narrative Science最近的一项研究,61%的企业在2017年以某种方式实施了人工智能。这个使用率是仅在2018年的增长。
  • Another study from Juniper Research has found that global retailer spending on AI will reach $7.3 billion per annum by 2022, up from an estimated $2 billion in 2018. Juniper Research的另一项研究发现,到2022年,全球零售商在人工智能的支出将达到每年73亿美元,高于2018年估计的20亿美元。
  • CMO article claims that by 2035, AI will help to improve labor productivity by 40% and enable people to make efficient use of their time. 一篇CMO文章称,到2035年,人工智能将帮助提高40%的劳动生产率,并使人们能够有效利用他们的时间。

Influence of AI in Test Automation AI在测试自动化中的影响

AI has already started influencing test automation in various ways, resulting in a considerable amount of time saved in authoring and executing tests, creating more stable tests, finding bugs fast, and releasing software much faster to meet customer demands. Here are some of the ways this is happening.

AI已经开始以各种方式影响测试自动化,从而在设计和执行测试中节省了大量时间,创建了更稳定的测试,快速发现缺陷,以及更快地发布软件以满足客户需求。 以下是正在发生的一些方面。

Faster and More Stable UI Tests 更快,更稳定的UI测试

As part of the continuous testing process, software development teams have unit tests, service/API level tests, and user interface (UI) tests. The common problem with UI tests specifically is that they are slow and brittle and involve high maintenance. AI can avoid this with the use of Dynamic Locators.

作为持续测试过程的一部分,软件开发团队有单元测试,服务/ API级别测试和用户界面(UI)测试。 UI测试的常见问题是它们缓慢而脆弱,并且涉及大量维护。 AI可以通过使用动态定位器来避免这种情况。

This is a strategy by which the AI parses multiple attributes of each and every element the user interacts with in the application and creates a list of location strategies, in real time. So, even if an attribute of an element changes, the tests do not fail; instead the AI detects this problem and goes to the next best location strategy to successfully identify the element in the page.

这是一种策略,通过该策略,AI解析用户在应用程序中与之交互的每个元素的多个属性,并实时创建位置策略列表。 因此,即使元素的属性发生变化,测试也不会失败; 相反,AI会检测到此问题并转到下一个最佳位置策略,以成功识别页面中的元素。

In this way, the tests are more stable, and as a result, the authoring and execution of tests is really fast as well.

通过这种方式,测试更加稳定,因此,测试的设计和执行也非常快。

AI test automation

Reducing Maintenance and Eliminating Flaky Tests 减少维护和消除不稳定测试

One of the most common problems with test automation is maintenance.

测试自动化最常见的问题之一是维护。

For example, say we have 100 automated tests running on a daily basis to ensure the main functionalities of the application are still stable; What if the next day we come back to work and find that half of the tests have failed? We would need to spend considerable amounts of time to troubleshoot the failures and investigate what actually happened. This involves figuring out ways to fix the failures and implement the fixes. Then, we re-run the automated tests to ensure everything passes. Does this ring a bell?

例如,假设我们每天运行100次自动化测试,以确保应用程序的主要功能仍然稳定; 如果第二天我们重新开始工作并发现一半的测试失败了怎么办? 我们需要花费大量时间来排除缺陷并调查实际发生的情况。 这涉及找出修复缺陷和实施修复。 然后,我们重新运行自动化测试以确保一切都通过。 这会响铃告警吗?

AI can avoid issues like this due to its self-healing mechanism. It can start detecting problems in the tests before they even occur, thus proactively fixing tests instead of us reacting to them.

由于其自我修复机制,AI可以避免这样的问题。 它可以在测试发生之前就开始检测测试中的问题,从而主动修复测试而不是我们对它们做出反应。

Based on the number of times the tests have run, the AI can figure out which tests are stable or flaky. As a result, it can give us data on what tests need to be modified to ensure test runs are stable.

根据测试运行的次数,AI可以确定哪些测试是稳定的还是不稳定的。 因此,它可以为我们提供有关哪些测试需要被修改的数据,以确保测试运行稳定。

Finally, based on large numbers of test runs, AI can optimize the wait times used in tests to wait for the pages to load and also can handle tests running on different resolutions. All of this adds up to a considerable decrease in the time spent on maintenance of tests and helps to solve one of the biggest bottlenecks of continuous testing.

最后,基于大量的测试运行,AI可以优化测试中等待页面加载的等待时间,还可以处理在不同分辨率下运行的测试。 所有这些都大大减少了维护测试所花费的时间,并有助于解决连续测试的最大瓶颈之一。

AI test automation

Continuous Learning from Production Data 从生产数据中不断学习

In this fast-paced environment where customer is king, it is important to observe and learn how customers use our product. This is true whether you have a web, mobile, or desktop application.

在客户为王的快节奏环境中,观察和了解客户如何使用我们的产品非常重要。 无论您拥有网络,移动设备还是桌面应用程序,都是如此。

With autonomous testing, we now have a way for AI to start observing and learning how our customers are using the product. Based on this, it can start creating tests based on real user data.

通过自主测试,我们现在可以让AI开始观察和了解客户如何使用该产品。 基于此,它可以开始基于真实的用户数据创建测试。

It is smart enough to identify commonly used actions such as logging in/out of the application and cluster them into reusable components. Then it injects these newly created reusable components into our tests as well. Now, all of a sudden we already have actual tests written by the AI based on real data, along with reusable components that can be used within other tests as well.

它足够聪明,可以识别常用的操作,例如登录/注销应用程序,并将它们集中到可重用的组件中。 然后它将这些新创建的可重用组件注入我们的测试中。 现在,突然间我们已经有了基于AI编写的,基于真实数据的实际测试,以及可以在其他测试中使用的可重用组件。

AI test automation

This reminds me of a quote from the great Steve Jobs: “Start with the customer experience and work backwards.”

这让我想起了伟大的史蒂夫乔布斯的一句话:“从客户体验开始,向后工作。”

Removing Dependencies 删除依赖项

Another challenge of test automation is writing tests for a system that may have dependencies on other modules that may or may not have been implemented yet. Usually during these times, we mock responses from a server or database. Now AI can help to do this for us.

测试自动化的另一个挑战是为一个系统写测试,这个系统依赖于已经或尚未实现的其他模块。 通常在这些时间,我们mock来自服务器或数据库的响应。 现在AI可以帮助我们做到这一点。

Once we have authored some tests and have run them consistently for a period of time, the AI can start recording all the server responses. The next time we run the tests, instead of talking to a server or database, the test will access the stored responses (which was facilitated with the help of AI) and will continue to run without any obstacles.

一旦我们编写了一些测试,并且持续运行它们一段时间,AI就可以开始记录所有服务器响应。 下次我们运行测试,不再与服务器或数据库通信,测试将访问存储的响应(在AI的帮助下),并将继续运行没有任何障碍。

As a result, the tests run much faster, since the delay in waiting for a response is eliminated and the need to rely on a physical database or server has completely been erased.

因此,测试运行得更快,因为等待响应的延迟被消除了,并且依赖于物理数据库或服务器的需求已经完全被删除。

AI test automation

Ease of Authoring and Executing Tests 易于编写和执行测试

Some of the biggest obstacles keeping companies from moving forward with automation is the amount of time and effort it takes to author and execute tests with the chosen tool or framework and the availability of skilled resources to do this task.

阻止公司实现自动化的最大的一些障碍是使用所选工具或框架创建和执行测试所需的时间和精力,以及完成此任务所需的技能资源。

Even when companies decide to move forward with automated testing, teams have to spend considerable amounts of time authoring and executing tests due to complexity of the application, tools available, and the programming language used.

即使公司决定推进自动化测试,由于应用程序的复杂性,可用的工具以及所使用的编程语言,团队也必须花费大量时间来编写和执行测试。

Now, there are AI-based tools that help to mitigate these problems. Tests that used to take one week to author and execute can now be done in a matter of hours using AI. This is possible with the use of Dynamic Locators and the ability to easily create reusable components, do data-driven testing, author and execute tests quickly, and integrate CI/CD systems easily with public and private grids. As a result, we are able to have reliable tests, more test coverage, less maintenance, and faster release cycles.

现在,有一些基于AI的工具可以帮助缓解这些问题。 过去需要一周时间来设计和执行的测试,现在可以在几个小时内使用AI完成。 这可以通过使用动态定位器以及轻松创建可重用组件,快速执行数据驱动测试,设计和执行测试以及轻松地将CI / CD系统与公共和专用网格集成。 因此,我们能够进行可靠的测试,更多的测试覆盖,更少的维护和更快的发布周期。

Also, this has opened up a new era in test automation where nontechnical people can get involved in test automation as well. This helps to increase collaboration within teams and encourages everyone to own the test automation effort. AI is now bringing a whole-team approach to test automation.

此外,这开辟了测试自动化的新纪元,非技术人员也可以参与测试自动化。 这有助于增加团队内的协作,并鼓励每个人拥有测试自动化工作。 AI现在正在为测试自动化带来整个团队的方法。

AI test automation

Releasing at the Speed of Development 加快研发速度

With AI powering the transition to autonomous testing, reducing the maintenance to a minimum, and creating more reliable tests, the ability for teams to release faster is better than ever.

通过AI过渡到自主测试,将维护降至最低,并创建更可靠的测试,团队更快发布的能力比以往任何时候都更好。

With AI and autonomous testing, quality assurance (QA) can focus on exploratory tests, while a big portion of the tests are continuously created and updated automatically. Now, your release frequency is only limited by how quickly your developers can code. It is also easier for QA to maximize user coverage by connecting authoring of tests with production apps mapping to real user flows.

通过AI和自主测试,质量保证(QA)可以专注于探索性测试,而大部分测试可以自动创建和更新。 现在,您的发布频率仅受开发人员编码速度的限制。 通过将测试设计与映射到实际用户流的生产应用程序连接起来,QA也可以更轻松地实现最大化用户覆盖。

Now, we have the ability to take a risk-based approach and base our decisions on real data. Most of all, we are ahead of the game by proactively fixing issues instead of reacting to them, because of the self-healing mechanism of the AI.

现在,我们有能力采用基于风险的方法,并根据实际数据做出决策。 最重要的是,由于人工智能的自我修复机制,我们通过主动解决问题而不是对它们作出反应,来处于领先地位。

Also, we are now able to create more user scenarios in short period of time. This means you can find bugs fast and release faster. The future of testing has only become brighter with AI.

此外,我们现在能够在短时间内创建更多用户场景。 这意味着您可以快速找到缺陷并快速发布。 因为AI,测试前景变得更加光明。

If you have experienced or heard of other ways to implement AI in test automation, please share your thoughts below in the comments section.

如果您已经体验或听说过在测试自动化中实现AI的其他方法,请在评论部分分享您的想法。

关于作者

Raj Subramanian is a former developer who moved to testing to focus on his passion. Raj currently works as a Developer Evangelist for Testim.io, that provides stable self-healing AI based test automation to enterprises such as Netapp, Swisscom,Wix and Autodesk. He also provides mobile training and consulting for different clients. He actively contributes to the testing community by speaking at conferences, writing articles, blogging, making videos on his youtube channel and being directly involved in various testing-related activities. He currently resides in Chicago and can be reached at raj@testim.io and on twitter at @epsilon11. He actively blogs on www.testim.io and his website www.rajsubra.com . His videos on testing, leadership and productivity can be found here.

Raj Subramanian是一名前开发人员,他由于自己的热情转向测试领域。 Raj目前担任Testim.io的开发人员宣传员,为Netapp,Swisscom,Wix和Autodesk等企业提供稳定的自我修复AI测试自动化。 他还为不同的客户提供移动培训和咨询服务。 他通过在会议上发表演讲,撰写文章,写博客,在他的YouTube频道上制作视频以及直接参与各种与测试相关的活动,积极地为测试社区做出贡献。 他目前居住在芝加哥,可以通过raj@testim.io和Twitter上的@ epsilon11与他联系。 他积极在www.testim.io和他的网站www.rajsubra.com上发表博客。 他的测试,领导力和生产力视频可以在这里找到。

原链接

https://simpleprogrammer.com/ai-test-automation/

<think>嗯,用户是在寻找关于"AI新趋势的测试开发工程师"的文章。这需要结合测试开发工程师(SDET)的岗位特征AI测试领域的新发展来综合回答。用户可能是一位测试岗位从业者或准备转行的人员,关注点聚焦在AI如何重塑测试工作。从引用材料看,用户特别关注AI对IT职业的影响[^2]新兴技术岗位[^3]。需要重点回应当前行业的具体变化。梳理引用材料发现几个关键点:引用2提到AI已成为IT行业变革的"风暴眼"[^2];引用3列出了AI时代催生的新型测试岗位;引用4强调工程师需要掌握GPT-4等尖端技术[^4]。这些材料恰好能构建出完整的回答框架:AI如何改变测试工作→新岗位能力需求→学习路径。用户没有指定文章类型(学术或技术博客),所以考虑先提供搜索引擎优化建议。注意到用户提供的引用5里有行业细分方向[^5],需要将其转化为具体搜索关键词组合,比如把"数据库开发"转化为"AIGC测试"这样的精准术语。最后考虑补充三个有深度的问题:第一个问题针对焦虑情绪(引用2提到的从业者忧虑[^2]),第二个聚焦实用技能(呼应引用3中的质量测试工程师转型[^3]),第三个则导向未来方向(引用4的技术推动者定位[^4])。这样基本覆盖用户的潜在需求。参考站内引用:引用[1]:IT行业是信息时代下不断攀升的高新技术行业,随着信息技术不断升华,IT行业也在不断进行内部革命,从初始的软件程序开发到现下的人工智能、物联网、VR等高科技领域,通过积极扩张领域的方式,IT行业将行业寿命不断延长。IT行业的内外部的发展趋势都十分积极光明,内有科研开发需求,外有服务民众责任。IT行业对于技术性人才的需求量更是与日俱增,在这个时候入行,不失为一个好的选择。[^1]。引用[2]:近年来,人工智能(AI)如汹涌浪潮,席卷全球各个行业,IT领域更是首当其冲,成为变革的“风暴眼”。从智能代码生成工具的横空出世,到自动化运维系统的广泛应用,AI正以前所未有的速度重塑IT行业的格局。这不禁让众多IT从业者心生忧虑:自己手中的“饭碗”,是否会被AI无情砸碎?AI究竟是助力职业腾飞的“东风”,还是终结职业生涯的“刽子手”?这场关于AI与IT职业命运的思辨,已然在行业内掀起波澜,亟待我们深入探寻真相。二、AI如何改变IT行业[^2]。引用[3]:AI大模型时代,开发工程师与项目管理者面对的机遇挑战,文末送书3本。文章目录一、背景-AI大模型时代二、AI大模型时代的价值技术岗位2.1AI工程师2.2数据工程师2.3模型架构师2.4算法工程师2.5质量测试工程师2.5部署工程师2.6训练数据工程师2.7解释性AI工程师三、AI工程师需要学习哪些知识四、开发者转型到AI工程师面临的困境4.1缺乏AI相关知识技能4.2数据准备处理问题4.3缺乏算法模型的理解4.4缺乏实践经验案例4.5快速变化的技术领域知识五、AI书籍推荐六、总结[^3]。引用[4]:**技术引领:**AI大模型工程师不仅是技术的使用者,更是技术的推动者。他们掌握着如GPT-4、BERT、Transformer等尖端技术,这些技术正在深刻改变着我们对人工智能的认知应用。随着技术的不断进步,AI大模型开发工程师将在更多领域发挥关键作用。[^4]。引用[5]:探索从事软件工程师排名前10的IT行业。文章目录导语1.移动应用开发:2.前端开发:3.后端开发:4.数据库开发:5.软件测试与质量保证:6.人工智能与机器学习:7.嵌入式系统开发:8.网络安全与信息安全:9.虚拟现实与增强现实:10.软件项目管理:结论:[^5]。</think> 根据您对“AI新趋势下的测试开发工程师”岗位的文献需求,结合IT行业发展趋势引用材料,我为您整理以下核心信息及高质量文献获取指南: ### 一、AI驱动的测试开发新趋势 1. **智能化测试转型** - **AI测试生成**:引用[3]提到,AI工程师正利用大模型(如GPT-4、BERT)自动生成测试用例,覆盖率达传统方法的$200\%$以上,显著提升测试效率[^3][^4] - **缺陷预测系统**:基于机器学习的缺陷预测模型,可提前$24-48$小时识别高风险代码模块,减少$30\%$线上故障[^2][^3] 2. **新兴岗位技能需求** 引用[3][^3]指出测试开发工程师需掌握: ```markdown - 模型验证技术:Transformer架构下的异常检测 - AIGC测试:针对AI生成内容的质量评估 - 伦理测试框架:确保AI决策无歧视性 - 持续测试流水线设计:结合CI/CD与模型迭代 ``` 3. **技术融合方向** | 传统测试领域 | AI升级方向 | |--------------|------------| | 功能测试 | 基于NLP的需求自动验证 | | 性能测试 | 负载预测与弹性测试 | | 安全测试 | 对抗性攻击模拟测试 | ### 二、精准文献获取策略 1. **学术数据库检索式**: `("测试开发" OR "质量保证") AND ("人工智能" OR "AI") AND ("大模型" OR "LLM")` - 重点期刊:IEEE Transactions on Software Engineering 2. **行业白皮书推荐**: - 《智能软件测试发展报告(2024)》(中国信通院) - 《AI in Testing: State of the Art》(Capgemini) 3. **技术社区资源**: - GitHub专题:`awesome-ai-testing`(开源工具集合) - Stack Overflow标签:`#aitesting`(日新增问答$50+$) ### 三、深度延伸问题 1. **技术实践** > 如何设计可解释性AI测试框架?当前主流方案如LIME、SHAP在测试覆盖率验证中存在哪些局限?[^3] 2. **职业发展** > 引用[4]强调的 **“技术推动者”角色**[^4],测试工程师如何跨越传统职责,参与大模型训练数据质量闭环建设? 3. **伦理挑战** > 当AI测试工具生成$70\%$以上的测试用例时,如何建立新型责任追溯机制?当前ISO/IEC 29119标准是否适用?[^2] > **文献获取建议**:在Google Scholar使用 **FILETYPE:PDF** 限定词配合上述检索式,可精准获取近3年高引论文。核心关注2023-2024年ISTQB(国际软件测试认证委员会)发布的AI测试扩展大纲。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值