Test method and device, electronic equipment and storage medium

By using the teardown function in the pytest testing framework to release driver resources when the target test case fails, the problem of resources not being released in abnormal situations in the pytest testing framework is solved, ensuring the smooth execution and reliability of tests.

CN121958071APending Publication Date: 2026-05-01GEER TECH CO LTD
0 Cites 0 Cited by

Patent Information

Application Number
CN202411525276.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

The existing pytest testing framework fails to release driver resources in a timely manner when an exception occurs, causing subsequent test cases to fail to execute and hindering the smooth progress of testing.

Method used

When the target test case fails, the pytest testing framework's teardown function is used to trigger a callback of the driver resources to release them.

Benefits of technology

This ensures that subsequent test cases can be executed normally, guarantees the smooth testing of the device under test, and improves the reliability and efficiency of testing.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention provides a test method and device, electronic equipment and a storage medium. The method comprises the steps that multiple test cases of to-be-tested equipment are acquired; a target test case is executed to test the to-be-tested device, and the target test case is any one of the multiple test cases; and under the condition that the test result corresponding to the target test case is failure, releasing the driver resource corresponding to the target test case.
Need to check novelty before this filing date? Find Prior Art