Close

自动化软件测试

There is a difference between creating software that works and software that works well. To ensure that software falls into the latter category, developers generally prefer benchmark testing.

This methodology stands out among the different types of software testing to identify where a project stands relative to rival solutions and which aspects need improvement.

This article will explain how benchmark testing achieves that, how it helps ensure software applications meet performance expectations, and which best practices to consider when implementing the technique.


什么是自动化测试?


What is automated testing?

自动化测试是应用软件工具来自动化人工驱动的审查和验证软件产品的手动流程。现在,大多数现代敏捷DevOps 软件项目从一开始就包括自动化测试。但是,要充分理解自动化测试的价值,了解在自动化测试广泛采用之前生活是什么样子会有所帮助。

Types of benchmark software testing

当手动测试成为常态时,软件公司通常会雇用全职 QA 团队。该团队将制定一组“测试计划”或分步清单,以判定软件项目的某个功能按预期运行。然后,每次向软件项目推送新的更新或变更时,QA 团队都会手动执行这些清单,然后将测试计划的结果返回给工程团队进行审查,并进一步开发以解决问题。

此过程缓慢、昂贵且容易出错。自动化测试大幅提高了团队效率和质量保证团队的投资回报率。

自动化测试将所有权责任交给了工程团队。测试计划与常规路线图功能开发一起制定,然后由软件持续集成工具自动执行。自动化测试促进了 QA 团队的精简规模,使 QA 团队能够专注于更敏感的功能。


Developers can consider a range of benchmarks for measuring software performance during development, depending on the functionality they are most interested in perfecting. Let’s look at the four most common areas of benchmark testing:

Performance benchmarks

Performance benchmark testing measures the speed and efficiency of a software application under typical usage scenarios. By simulating real-world scenarios and user interactions, developers can gather valuable data on response times, transaction processing speeds, and resource utilization (CPU, memory, disk I/O). This information helps pinpoint areas where code optimization or hardware upgrades might be necessary to eradicate performance issues.

Load benchmarks

Load benchmarks assess how the software performs under different user loads. By simulating various concurrent users, developers can identify performance bottlenecks that may emerge when the application is at maximum capacity. This is crucial for applications that expect high traffic or are subject to seasonal peaks in usage. Analyzing metrics like response times, error rates, and throughput under different load conditions helps ensure the software can handle the expected user demand.

查看解决方案

使用 Open DevOps 构建和操作软件

相关资料

DevOps 的自动化测试

Why is testing automation important to continuous delivery?

持续交付 (CD) 就是要尽快向客户交付新的代码版本。自动化测试对于实现这一目标至关重要。如果交付流程中需要手动执行耗时的步骤,则无法自动向用户交付。

CD 是更大的部署管道的一部分。CD 是持续集成 (CI) 的继任者,也依赖于持续集成。CI 完全负责针对任何新的代码变更运行自动化测试,并验证这些变更不会破坏既定功能或引入任何新错误。持续集成步骤通过自动化测试计划后,就会触发 CD。

自动化测试、CI 和 CD 之间的这种关系为高速软件团队带来了许多好处。自动化测试通过确保新提交不会引入任何错误来确保开发每个阶段的质量,因此软件始终处于部署就绪状态。

Scalability benchmarks

While load benchmarking tests the software's behavior under specific conditions, scalability benchmarks evaluate the ability to transition between those conditions. This could involve increasing the number of users, data volume, or transaction volume. All businesses aim to grow, and governments must prepare their platforms for mass adoption. Still, outside those realms, many other applications with high growth potential exist - such as multi-user online games, social networks, and IOT applications.

哪些类型的软件测试应该首先实现自动化?


1. 端到端测试

可以说,要实现的最有价值的测试是端到端 (E2E) 测试。E2E 测试模拟整个软件产品堆栈中的用户级体验。E2E 测试计划通常涵盖用户级别的故事,例如:“用户可以登录”、“用户可以存款”、“用户可以更改电子邮件设置”。这些测试实施起来非常有价值,因为它们可以确保真实用户即使推送了新的提交,也能获得流畅的无错误体验。

E2E 测试工具会捕获和重放用户操作,因此 E2E 测试计划随后成为关键用户体验流程的记录。如果软件产品缺乏任何类型的自动化测试范围,则通过对最关键的业务流程实施 E2E 测试,它将获得最大价值。在预先捕获和记录用户流程顺序方面,E2E 测试可能很昂贵。如果软件产品不是每天快速发布,那么让人工团队手动执行 E2E 测试计划会更实惠。

哪些类型的软件测试应该手动完成?


可以说,任何可以自动化的测试都应该是自动化的。这是生产力和人力成本的巨大提高。话虽如此,有时候与执行手动测试相比,开发自动化测试套件的投资回报率不值得。

1. 探索性测试

自动化测试是脚本化的,并遵循一系列步骤来验证行为。探索性测试更加随机,它会尝试使用非脚本序列来发现错误或意外行为。尽管有一些软件工具可以建立软件探索性测试套件,但它们尚未完全成熟并被广泛采用。指派一名手动 QA 测试人员并利用人类的创造力来探索如何打破软件产品,效率要高得多。

2. 视觉回归测试

当软件用户界面引入视觉设计缺陷时,就会发生视觉回归。这可能是用户界面元素错位、字体错误、颜色错误或更多。与探索性测试一样,也有一些工具可以编写自动化测试来捕捉这些回归。这些工具捕获软件产品不同状态的屏幕截图,然后使用 OCR 将其与预期结果进行比较。这些测试的开发成本很高,而且这些工具没有被广泛采用。用人眼观察某物,看看是否存在任何视觉问题,可能要有效得多。

3. 为您的 DevOps 团队构建测试自动化框架

自动化测试没有包罗万象的解决方案。在为团队规划自动化测试解决方案时,需要考虑几个关键因素。

让自动化测试成为 CD 管道的一部分


自动化测试是一种标准的现代软件开发实践。最好的团队和公司都使用自动化测试。CI/CD 依赖于自动化测试,对于帮助最优秀的团队向客户交付可靠而强大的软件至关重要。

Atlassian 的 Open DevOps 还提供了一个开放的工具链平台,允许您使用自己喜欢的工具构建基于 CD 的开发管道。通过我们的 DevOps 测试教程了解 Atlassian 和第三方工具如何将测试集成到您的工作流程中。

Jira darkmode backlog view screenshot.

Jira Backlog: Use the backlog to plan and prioritize benchmark testing activities alongside other development tasks.

Try Jira’s Backlog Feature

Jira darkmode overview view screenshot.

Jira Reports: Use Jira’s out-of-the-box reports to help teams track project progress, visualize trends, and predict future performance. These reports can also be used to communicate results to stakeholders.

Use free project report template

By integrating benchmark testing into Jira, teams can ensure that performance optimization is an integral part of the development process, leading to better software quality.

Common challenges in benchmark software testing


The above list of best practices highlights the importance of exercising caution when setting up and managing a benchmark testing program.  Here are some common pitfalls of benchmark software testing and how to deal with them:

  • Resource Limitations: Benchmark testing can be resource-intensive, requiring significant hardware and software resources. One benefit of using Jira is that it has built-in resource management software that helps teams free up and allocate the necessary resources for testing.
  • Maintaining Test Data: Creating and managing realistic test data can be time-consuming and challenging. Developers can use Test Data Management (TDM) tools to generate, mask, and manage test data. These tools can extract subsets of data from production databases, use masking to protect data privacy, or create synthetic data that mimics the statistical properties of the original datasets.   
  • Variability in Test Environments: Aligning the test environment with the production environment can be complex, and minor differences can lead to inaccurate results. Once again, Jira offers a solution. Creating a test environment management system in Jira helps developers track and manage test environments, ensuring consistency and reducing variability.

Integrate benchmark software testing in Jira for better software development


Beyond using Jira for specific tasks like resource management and test environment management, the platform has several features that can be integrated into the benchmark testing workflow. Here are some areas where Jira integration can help streamline the entire process:

  • Tracking Performance Trends: Jira’s Issues and Custom Fields functionalities allow teams to flag and register performance-related bugs, improvements, and tasks. These are basic requirements for monitoring performance metrics over time, identifying areas for improvement, tracking the resolution of anomalies, and measuring the impact of optimizations.
  • Managing Benchmarking Activities: In Jira, teams can create Agile workflow plans and Agile software development boards to prioritize and transition between specific phases of the benchmark testing process.
  • Effective Collaboration: Facilitate communication and collaboration among developers, testers, and stakeholders regarding performance issues and improvements. A key aspect of this functionality is Jira’s scope for generating custom reports to visualize performance data, track progress, and communicate findings. In parallel, the Issues feature links performance testing notifications to related development tasks, bugs, or user stories. Also, the Attachments feature leverages centralized access to include performance test results, reports, and analysis documents with relevant issues.
  • Backlog: Jira’s backlog structure is worth reiterating since it facilitates task tagging and prioritization within benchmark testing. By creating user stories specifically for performance tests, teams can leverage the backlog's features for detailed planning, scheduling sprints, and tracking progress. This is particularly useful for teams that like to work iteratively because they can plan all tasks in the backlog and visualize the project’s scope.

By integrating free benchmark software testing into Jira, development teams can foster a culture of performance optimization, leading to higher-quality software, improved user satisfaction, and a more efficient development process. 

Get Jira Free


分享这篇文章

推荐阅读

将这些资源加入书签,以了解 DevOps 团队的类型,或获取 Atlassian 关于 DevOps 的持续更新。

Devops 示意图

DevOps 社区

Devops 示意图

阅读博客文章

地图插图

免费试用

注册以获取我们的 DevOps 新闻资讯

Thank you for signing up