Method, device and computer program product for executing test cases

US10534699B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10534699-B2
Application numberUS-201816173077-A
CountryUS
Kind codeB2
Filing dateOct 29, 2018
Priority dateOct 27, 2017
Publication dateJan 14, 2020
Grant dateJan 14, 2020

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Embodiments of the present disclosure relate to a method and device for executing test cases. The method comprises obtaining a set of test cases to be executed, and determining a test platform type and a test script associated with each test case in the set of test cases based on a knowledge base. The method further comprises dividing the set of test cases into a plurality of test subsets or test suites based on the test platform type, and executing test cases in each test subset using the respective test environment and test script. In embodiments of the present disclosure, the plurality of test suites are generated automatically based on the knowledge base, and the respective test environment and test script are used for executing each test suite. Accordingly, embodiments of the present disclosure can implement automatic generation and execution of the test suites, and can improve the operation efficiency for test cases.

First claim

Opening claim text (preview).

We claim: 1. A method for executing a test case, comprising: obtaining a set of test cases to be executed, the set of test cases being divided into one or more test subsets; for a test case in the set of test cases: determining a test platform type and a test script associated with the test case based on a knowledge base; determining, based on the test platform type, a test subset to which the test case belongs; executing the test case in the test subset based on the test script; and obtaining running information of the test script based on the knowledge base, the running information including runtime information of the test script and being used for the execution of the test case; wherein the set of test cases is divided into the one or more test subsets based on the test platform type and the runtime information such that differences in runtime among all of the test subsets are within a threshold range. 2. The method according to claim 1 , wherein the obtaining a set of test cases to be executed comprises: obtaining, based on a set of components to be tested, the set of test cases by querying the knowledge base. 3. The method according to claim 1 , wherein the executing the test case in the test subset comprises: executing, by a plurality of test execution engines, the plurality of test subsets in parallel. 4. The method according to claim 1 , wherein the executing the test case in the test subset comprises: instantiating a test environment for the test platform type based on the test platform type; and executing, in the test environment, a plurality of test scripts associated with a plurality of test cases in the test subset sequentially. 5. The method according to claim 4 , wherein the executing a plurality of test scripts associated with a plurality of test cases in the test subset sequentially comprises: in response to a plurality of faults including a first fault and a second fault occurring during the execution of the test subset, adjusting a first test case associated with the first fault to be after a second test case associated with the second fault in order; re-executing, for the adjusted plurality of faults, test cases associated with the plurality of faults. 6. The method according to claim 1 , further comprising: after completion of the execution of the test subset, collecting a test result from a running log; and generating a test report based on the collected test result. 7. The method according to claim 1 , wherein the method is used for automatic regression test, and the knowledge base is built by collecting historically executed test cases. 8. A device for executing a test case, comprising: a processing unit; and a memory coupled to the processing unit and storing instructions thereon, the instructions, when executed by the processing unit, perform the following acts: obtaining a set of test cases to be executed, the set of test cases being divided into one or more test subsets; for a test case in the set of test cases: determining a test platform type and a test script associated with the test case based on a knowledge base; determining, based on the test platform type, a test subset to which the test case belongs; executing the test case in the test subset based on the test script; and obtaining running information of the test script based on the knowledge base, the running information including runtime information of the test script and being used for the execution of the test case; wherein the set of test cases is divided into the one or more test subsets based on the test platform type and the runtime information such that differences in runtime among all of the test subsets are within a threshold range. 9. The device according to claim 8 , wherein the obtaining a set of test cases to be executed comprises: obtaining, based on a set of components to be tested, the set of test cases by querying the knowledge base. 10. The device according to claim 8 , wherein the executing the test case in the test subset comprises: executing, by a plurality of test execution engines, the plurality of test subsets in parallel. 11. The device according to claim 8 , wherein the executing the test case in the test subset comprises: instantiating a test environment for the test platform type based on the test platform type; and executing, in the test environment, a plurality of test scripts associated with a plurality of test cases in the test subset sequentially. 12. The device according to claim 11 , wherein the executing a plurality of test scripts associated with a plurality of test cases in the test subset sequentially comprises: in response to a plurality of faults including a first fault and a second fault occurring during the execution of the test subset, adjusting a first test case associated with the first fault to be after a second test case associated with the second fault in order; re-executing, for the adjusted plurality of faults, test cases associated with the plurality of faults. 13. The device according to claim 8 , the acts further comprising: after completion of the execution of the test subset, collecting a test result from a running log; and generating a test report based on the collected test result. 14. The device according to claim 8 , wherein the device is used for automatic regression test, and the knowledge base is built by collecting historically executed test cases. 15. A computer program product that is tangibly stored on a non-transient computer readable medium and includes machine-executable instructions, the machine-executable instructions, when executed, for executing a test case by performing the steps of: obtaining a set of test cases to be executed, the set of test cases being divided into one or more test subsets; for a test case in the set of test cases: determining a test platform type and a test script associated with the test case based on a knowledge base; determining, based on the test platform type, a test subset to which the test case belongs; executing the test case in the test subset based on the test script; and obtaining running information of the test script based on the knowledge base, the running information including runtime information of the test script and being used for the execution of the test case; wherein the set of test cases is divided into the one or more test subsets based on the test platform type and the runtime information such that differences in runtime among all of the test subsets are within a threshold range. 16. The computer program product of claim 15 , wherein the obtaining a set of test cases to be executed comprises: obtaining, based on a set of components to be tested, the set of test cases by querying the knowledge base. 17. A method for executing a test case, comprising: obtaining a set of test cases to be executed, the set of test cases being divided into one or more test subsets; for a test case in the set of test cases: determining a test platform type and a test script associated with the test case based on a knowledge base; determining, based on the test platform type, a test subset to which the test case belongs; and executing the test case in the test subset based on the test script; wherein the executing the test case in the test subset comprises: instantiating a test environment for the test platform type based on the test platform type; and executing, in the test environment, a plurality of test scripts associated with a plurality of test cases in the test subset sequentially; and wherein the executing a

Assignees

Inventors

Classifications

  • Knowledge representation; Symbolic representation · CPC title

  • by runtime analysis (performance monitoring G06F11/3466) · CPC title

  • for test execution, e.g. scheduling of test suites · CPC title

  • for test design, e.g. generating new test cases · CPC title

  • Physics · mapped topic

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10534699B2 cover?
Embodiments of the present disclosure relate to a method and device for executing test cases. The method comprises obtaining a set of test cases to be executed, and determining a test platform type and a test script associated with each test case in the set of test cases based on a knowledge base. The method further comprises dividing the set of test cases into a plurality of test subsets or te…
Who is the assignee on this patent?
Emc Ip Holding Co Llc
What technology area does this patent fall under?
Primary CPC classification G06F11/3688. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jan 14 2020 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 3 related publications on this page (citations in our corpus or others sharing the same primary CPC).