Shift Left Testing
in In-My-Mind with 0 comment

Shift Left Testing

in In-My-Mind with 0 comment

1. Involve Testers Earlier in the Development Process

Testers should be involved in the development process as early as possible to provide feedback and help identify defects. This involves working closely with developers, attending daily stand-ups, and participating in design and code reviews.
测试人员应尽早参与开发过程,提供反馈并帮助识别缺陷。这包括与开发人员紧密合作,参加每日站立,并参与设计和代码审查。

To implement shift left testing, organizations often follow Agile Methodology and have sprint ceremonies such as sprint grooming and sprint planning where both QA and Development teams are involved from the beginning.
为了实施左移测试,组织通常遵循敏捷方法论,并有冲刺仪式,如冲刺梳理和冲刺计划,QA和开发团队从一开始就参与其中。

During this time, QA can ask clarifying questions about requirements and provide inputs as well.
在这期间,QA可以提出关于需求的澄清问题,并提供投入。

2. Implement BDD/TDD Approach

This approach has several benefits. The test cases prepared by QA can help developers think about scenarios they may not have considered. Additionally, QA may identify cases that were missed by the product owner, business analyst, or the person who is responsible for gathering requirements.
这种方法有几个好处。由QA准备的测试用例可以帮助开发者思考他们可能没有考虑过的情况。此外,QA可能会发现产品所有者、业务分析员或负责收集需求的人所遗漏的案例。

Identifying potential issues and creating test cases early in the development process can save time and effort later on. Without this early identification, issues may not be discovered until later stages of development or testing, at which point it may be more time-consuming and costly to make changes to address them.
在开发过程的早期识别潜在的问题和创建测试用例可以节省以后的时间和精力。如果没有这种早期识别,问题可能要到开发或测试的后期阶段才会被发现,这时再进行修改来解决这些问题可能会更费时和费力。

3. Encourage Developers to Write Unit Testing

Unit testing involves testing individual units or components of code to ensure that they are working correctly. It is an important shift left testing technique that can be used to identify and fix defects early in the development process. You can provide training on how to write effective unit tests, as well as tools and frameworks that can be used to automate unit testing.
单元测试涉及测试代码的单个单元或组件,以确保它们工作正常。它是一种重要的左移测试技术,可以用来在开发过程的早期识别和修复缺陷。你可以提供关于如何编写有效的单元测试的培训,以及可用于自动化单元测试的工具和框架。

4. Conducting Internal Demo

Conducting an internal demo to the sprint team on the sprint closure day is an effective way to implement shift left testing. During this demo, team members can visually see the work completed in the previous sprint, including any changes or updates to the website or product.
在冲刺结束日向冲刺团队进行内部演示是实施左移测试的有效方法。在这个演示中,团队成员可以直观地看到前一个冲刺阶段完成的工作,包括网站或产品的任何变化或更新。

This allows them to provide feedback and identify potential issues early on rather than waiting for formal testing to be conducted later in the process.
这使他们能够在早期提供反馈并识别潜在的问题,而不是等待在后期进行正式的测试。

By involving the entire team in the demo, you can increase the chances of identifying potential issues and gathering valuable feedback. This can help improve the quality and value of the product, as it will not only be tested by a dedicated tester at a later stage but also reviewed and assessed by the entire team. This task ensures all relevant scenarios are considered, and necessary changes are made before the product is released.
通过让整个团队参与演示,你可以增加发现潜在问题和收集有价值的反馈的机会。这可以帮助提高产品的质量和价值,因为它不仅会在以后的阶段由专门的测试人员进行测试,而且还会由整个团队进行审查和评估。这项任务确保所有相关的方案都得到考虑,并在产品发布前做出必要的修改。

5. Monitor Test Coverage

Use tools to monitor test coverage or the percentage of code that is tested to ensure that you are testing all relevant code. Using code coverage tools can help you monitor test coverage and also helps in analyzing your codebase and reports on the percentage of code that is covered by tests.
使用工具来监控测试覆盖率或被测试的代码的百分比,以确保你正在测试所有相关的代码。使用代码覆盖率工具可以帮助你监控测试覆盖率,也有助于分析你的代码库和报告测试所覆盖的代码百分比。

6. Use Version Control and Code Review

Use version control systems, such as Git, to track changes to your codebase and enable collaboration. Use code review to ensure that code is reviewed and tested by multiple team members before it is deployed.
使用版本控制系统,如Git,来跟踪你的代码库的变化并实现协作。使用代码审查以确保代码在部署前由多个团队成员审查和测试。

For example, you might set up a code review process in which all new code is reviewed by at least one other team member before it is merged into the main codebase.
例如,你可以设置一个代码审查过程,所有的新代码在合并到主代码库之前,至少要由另外一个团队成员进行审查。

This can help identify and fix defects early on and improve the overall quality of your software. By incorporating these techniques into your shift left testing strategy, you can effectively identify and fix defects early in the development process, improving the quality and efficiency of your software
这可以帮助早期识别和修复缺陷,提高你的软件的整体质量。通过将这些技术纳入你的左移测试策略,你可以在开发过程的早期有效地识别和修复缺陷,提高软件的质量和效率

7. Automation Testing

Automated testing can be used to test individual units or components of code as they are being developed, allowing you to identify defects early on. This can help reduce the time and effort required for testing later on and improve the quality of your software by identifying and fixing defects early in the development cycle.
自动测试可以用来测试正在开发的单个单元或代码组件,使你能够在早期发现缺陷。这可以帮助减少以后测试所需的时间和精力,并通过在开发周期的早期识别和修复缺陷来提高软件的质量。

For example, when developing microservices, you can use automated testing to perform component testing early in the development process. By preparing test cases based on the Swagger or Confluence page and calling the service directly from the feature branch, you can verify that the service is working as intended.
例如,在开发微服务时,你可以在开发过程的早期使用自动化测试来进行组件测试。通过准备基于Swagger或Confluence页面的测试用例,并直接从功能分支调用服务,你可以验证服务是否按预期工作。

You can also write code in the same branch as the development team and check classes or enumerations that are being used to ensure that they meet the requirements.
你也可以和开发团队在同一个分支写代码,并检查正在使用的类或枚举,以确保它们符合要求。

By performing early testing, you can identify bugs and defects at an early stage of software development, improving the quality and efficiency of your development process.
通过进行早期测试,你可以在软件开发的早期阶段发现错误和缺陷,提高开发过程的质量和效率。

8. Testing Every Component

Testing every component is an important aspect of shift left testing. If you are testing an API and not all of the API is developed, you can still test what is available and mock the response for the rest.
测试每个组件是左移测试的一个重要方面。如果你正在测试一个API,但不是所有的API都被开发出来,你仍然可以测试可用的东西,并模拟其余部分的响应。

Using concepts such as stubs and drivers, you can focus on testing the ready components without worrying about what is not yet available. This can give you confidence that the developed components are working correctly.
使用存根和驱动等概念,你可以专注于测试准备好的组件,而不必担心还没有的东西。这可以让你相信所开发的组件是正确工作的。

Later, when the entire API is available for testing, you can quickly verify its functionality without spending a lot of time on testing that has already been covered earlier.
后来,当整个API可供测试时,你可以快速验证其功能,而不需要花费大量的时间在前面已经涉及的测试上。

Additionally, you can concentrate on your API’s functioning in connection to other third-party APIs it communicates with during this testing phase. You can make sure your API is operating properly and consistently by evaluating various third-party API behaviors.
此外,在这个测试阶段,你可以专注于你的API与其他第三方API沟通的功能。你可以通过评估各种第三方API的行为来确保你的API运行正常和稳定

9. Include Security Testing

Security testing should be integrated into the development process as early as possible to identify and fix security vulnerabilities early on. This can involve using tools such as static analysis tools, dynamic analysis tools, and penetration testing tools to test the security of the software.
安全测试应尽早融入开发过程,以尽早发现和修复安全漏洞。这可以包括使用静态分析工具、动态分析工具和渗透测试工具等工具来测试软件的安全性。

These tools can be used to test the security of the software early in the development process.
这些工具可用于在开发过程的早期测试软件的安全性。

Comments are closed.