CN115080382A - Code testing method, device, equipment and medium - Google Patents
Code testing method, device, equipment and medium Download PDFInfo
- Publication number
- CN115080382A CN115080382A CN202210472290.4A CN202210472290A CN115080382A CN 115080382 A CN115080382 A CN 115080382A CN 202210472290 A CN202210472290 A CN 202210472290A CN 115080382 A CN115080382 A CN 115080382A
- Authority
- CN
- China
- Prior art keywords
- code
- branch
- new bios
- bios
- compatibility test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种代码测试方法、装置、设备及介质。The present invention relates to the field of computer technology, and in particular, to a code testing method, apparatus, device and medium.
背景技术Background technique
电子设备的基本输入输出系统(Base Input Output System,BIOS) 代码中包含电子设备最重要的基本输入输出程序、系统设置信息、开机后自检程序和系统自启动程序。在BIOS源代码开发完成后,通过编译器对 BIOS源代码进行编译,得到BIOS代码。然后将BIOS代码烧录至电子设备的芯片中,以使BIOS代码为电子设备提供最底层的、最直接的硬件设置和控制。通过对BIOS代码进行标准兼容性测试(Standard Compatibility Testing,SCT),可以将BIOS代码中不符合规范的代码筛选出来,及时修改。The basic input and output system (Base Input Output System, BIOS) code of electronic equipment includes the most important basic input and output program, system setting information, self-checking program and system self-starting program of electronic equipment. After the development of the BIOS source code is completed, the BIOS source code is compiled by the compiler to obtain the BIOS code. Then, the BIOS code is burned into the chip of the electronic device, so that the BIOS code provides the lowest-level and most direct hardware setting and control for the electronic device. By performing Standard Compatibility Testing (SCT) on the BIOS code, the codes that do not conform to the specification in the BIOS code can be screened out and modified in time.
相关技术中,BIOS代码的测试方案为:开发人员在多个分支上完成各自BIOS新功能的代码开发,定期将最新的BIOS分支源代码合入BIOS主干源代码而生成新的BIOS主干源代码。对新的BIOS主干源代码进行编译,得到新的BIOS代码。然后将新的BIOS代码更新到电子设备上,在电子设备上对新的BIOS代码进行标准兼容性测试。In the related art, the BIOS code testing scheme is as follows: developers complete the code development of new BIOS functions on multiple branches, and regularly merge the latest BIOS branch source code into the BIOS trunk source code to generate a new BIOS trunk source code. Compile the new BIOS main source code to get the new BIOS code. Then, the new BIOS code is updated to the electronic device, and a standard compatibility test is performed on the new BIOS code on the electronic device.
相关技术的缺陷在于:虽然可以发现新的BIOS代码的兼容性问题,但是不能提前防止兼容性问题流入BIOS主干源代码。另外,在电子设备上对新的BIOS代码进行兼容性测试,会占用大量的硬件资源,提高测试成本。The defect of the related art is that although compatibility problems of new BIOS codes can be found, compatibility problems cannot be prevented from flowing into the BIOS main source code in advance. In addition, the compatibility test of the new BIOS code on the electronic device will occupy a lot of hardware resources and increase the test cost.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种代码测试方法、装置、设备及介质,以解决相关技术中的BIOS代码的测试方案,不能提前防止兼容性问题流入BIOS主干源代码,会占用大量的硬件资源,提高测试成本的问题。The present invention provides a code testing method, device, equipment and medium, so as to solve the BIOS code testing scheme in the related art, which cannot prevent compatibility problems from flowing into the BIOS main source code in advance, which will occupy a large amount of hardware resources and increase the testing cost. The problem.
根据本发明的一方面,提供了一种代码测试方法,包括:According to an aspect of the present invention, a code testing method is provided, comprising:
获取用户输入的代码合并请求,所述代码合并请求携带新BIOS分支源代码;Obtain the code merge request input by the user, and the code merge request carries the new BIOS branch source code;
发送控制指令至兼容性测试进程,指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果;Sending a control instruction to the compatibility test process, instructing the compatibility test process, compiling the new BIOS branch source code to obtain a new BIOS branch code, and performing a compatibility test on the new BIOS branch code in the simulator, And feedback the compatibility test result of the new BIOS branch code;
若所述兼容性测试进程反馈的兼容性测试结果为测试通过,则将所述新BIOS分支源代码合入BIOS主干源代码生成新BIOS主干源代码。If the compatibility test result fed back by the compatibility test process is that the test is passed, the new BIOS branch source code is merged into the BIOS main source code to generate a new BIOS main source code.
根据本发明的另一方面,提供了一种代码测试装置,包括:According to another aspect of the present invention, a code testing device is provided, comprising:
请求获取模块,用于获取用户输入的代码合并请求,所述代码合并请求携带新BIOS分支源代码;a request acquisition module for acquiring a code merge request input by a user, where the code merge request carries the new BIOS branch source code;
代码测试模块,用于发送控制指令至兼容性测试进程,指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS 分支代码的兼容性测试结果;The code test module is used for sending control instructions to the compatibility test process, instructing the compatibility test process, compiling the source code of the new BIOS branch, obtaining the new BIOS branch code, and performing the new BIOS branch code in the simulator The code is tested for compatibility, and the compatibility test result of the new BIOS branch code is fed back;
代码合并模块,用于若所述兼容性测试进程反馈的兼容性测试结果为测试通过,则将所述新BIOS分支源代码合入BIOS主干源代码生成新BIOS 主干源代码。The code merging module is configured to merge the new BIOS branch source code into the BIOS main source code to generate a new BIOS main source code if the compatibility test result fed back by the compatibility test process is a test pass.
根据本发明的另一方面,提供了一种电子设备,所述电子设备包括:According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例所述的代码测试方法。The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform any of the embodiments of the present invention. Code testing methods.
根据本发明的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的代码测试方法。According to another aspect of the present invention, a computer-readable storage medium is provided, where computer instructions are stored in the computer-readable storage medium, and the computer instructions are used to cause a processor to implement any of the embodiments of the present invention when executed. code testing method.
本发明实施例的技术方案,通过获取用户输入的代码合并请求,代码合并请求携带新BIOS分支源代码;然后发送控制指令至兼容性测试进程,指示兼容性测试进程,对新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对新BIOS分支代码进行兼容性测试,并反馈新BIOS分支代码的兼容性测试结果;若兼容性测试结果为测试通过,则将新BIOS 分支源代码合入BIOS主干源代码生成新BIOS主干源代码,解决了相关技术中的BIOS代码的测试方案,不能提前防止标准兼容性问题流入BIOS主干源代码,会占用大量的硬件资源,提高测试成本的问题,取到了在代码合并之前进行兼容性测试,实现了对BIOS主干源代码的兼容性问题的预防,防止了兼容性问题流入代码主干,真正实现了在问题发生之前就解决了BIOS代码的兼容性问题,极大地降低了兼容性问题可能带来的影响,同时通过在模拟器下进行兼容性测试,减少了兼容性测试过程对物理机器的依赖,提高了测试环境的可移植性,也降低了测试成本的有益效果;通过发送控制指令至兼容性测试进程,指示兼容性测试进程,在模拟器下对新BIOS分支代码进行兼容性测试,减少了兼容性测试过程对物理机器的依赖,提高了测试环境的可移植性,也降低了测试成本;在所述新BIOS 分支源代码编译失败的情况下,直接则确定新BIOS分支代码测试失败,提高测试效率,避免有缺陷的新BIOS分支源代码合入BIOS主干源代码;在所述新BIOS分支代码没有通过兼容性测试的情况下,直接则确定新 BIOS分支代码测试失败,提高测试效率,避免有兼容性缺陷的新BIOS分支源代码合入BIOS主干源代码,防止了兼容性问题流入BIOS主干源代码;在新BIOS分支代码测试失败的情况下,自动阻塞新BIOS分支源代码合入 BIOS主干源代码,避免有兼容性缺陷的新BIOS分支源代码合入BIOS主干源代码,防止了兼容性问题流入BIOS主干源代码;可以基于与用户之间的交互操作,实时获取用户输入的代码合并请求,从而确定用户请求将新 BIOS分支源代码合入BIOS主干源代码;将预设的兼容性测试脚本存储至预设存储位置,以使兼容性测试进程实时调用预设的兼容性测试脚本,自动对新BIOS分支代码进行兼容性测试,提供测试效率。In the technical solution of the embodiment of the present invention, the code merge request input by the user is obtained, and the code merge request carries the source code of the new BIOS branch; then a control instruction is sent to the compatibility test process, indicating the compatibility test process, and the new BIOS branch source code is carried out. Compile, get the new BIOS branch code, test the compatibility of the new BIOS branch code in the simulator, and feed back the compatibility test result of the new BIOS branch code; Merge the BIOS main source code to generate a new BIOS main source code, which solves the test scheme of the BIOS code in the related technology. It cannot prevent the standard compatibility problem from flowing into the BIOS main source code in advance, which will occupy a lot of hardware resources and increase the test cost. , get the compatibility test before the code is merged, realize the prevention of the compatibility problem of the BIOS trunk source code, prevent the compatibility problem from flowing into the code trunk, and truly realize the compatibility of the BIOS code before the problem occurs. problems, which greatly reduces the possible impact of compatibility problems. At the same time, by conducting compatibility tests under the simulator, the dependence of the compatibility test process on physical machines is reduced, the portability of the test environment is improved, and the Beneficial effect of testing costs; by sending control commands to the compatibility testing process, instructing the compatibility testing process, and performing compatibility testing on the new BIOS branch code under the simulator, the dependence of the compatibility testing process on physical machines is reduced, and the performance of the compatibility testing process is improved. The portability of the test environment also reduces the test cost; in the case that the compilation of the new BIOS branch source code fails, it is directly determined that the test of the new BIOS branch code fails, the test efficiency is improved, and the defective new BIOS branch source code is avoided Merge the BIOS main source code; if the new BIOS branch code fails the compatibility test, directly determine that the new BIOS branch code fails the test, improve the test efficiency, and avoid the new BIOS branch source code with compatibility defects from being merged The BIOS main source code prevents compatibility problems from flowing into the BIOS main source code; in the case of a new BIOS branch code test failure, the new BIOS branch source code is automatically blocked and merged into the BIOS main source code to avoid the new BIOS branch with compatibility defects. The source code is merged into the BIOS trunk source code, preventing compatibility issues from flowing into the BIOS trunk source code; based on the interaction with the user, the code merge request input by the user can be obtained in real time, so as to determine the user's request to merge the new BIOS branch source code. Enter the BIOS main source code; store the preset compatibility test script in the preset storage location, so that the compatibility test process can call the preset compatibility test script in real time, automatically perform compatibility test on the new BIOS branch code, and provide test efficiency.
应当理解,本部分所描述的内容并非旨在标识本发明的实施例的关键或重要特征,也不用于限制本发明的范围。本发明的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or critical features of the embodiments of the invention, nor is it intended to limit the scope of the invention. Other features of the present invention will become readily understood from the following description.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1为本发明实施例一提供的一种代码测试方法的流程图。FIG. 1 is a flowchart of a code testing method according to Embodiment 1 of the present invention.
图2为本发明实施例二提供的一种代码测试方法的流程图。FIG. 2 is a flowchart of a code testing method according to Embodiment 2 of the present invention.
图3为本发明实施例三提供的一种代码测试方法的流程图。FIG. 3 is a flowchart of a code testing method according to Embodiment 3 of the present invention.
图4为本发明实施例四提供的一种代码测试装置的结构示意图。FIG. 4 is a schematic structural diagram of a code testing apparatus according to Embodiment 4 of the present invention.
图5为实现本发明实施例的代码测试方法的电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device implementing the code testing method according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only Embodiments are part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“目标”、“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包含”、“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "object", "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order. or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising", "including" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, eg, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to the explicit Those steps or units are explicitly listed, but may include other steps or units not expressly listed or inherent to the process, method, product or apparatus.
实施例一Example 1
图1为本发明实施例一提供的一种代码测试方法的流程图,本实施例可适用于在新的BIOS分支源代码合入BIOS主干源代码之前,针对新的 BIOS主干源代码对应的新的BIOS源代码,进行标准兼容性测试,提前防止标准兼容性问题流入BIOS主干源代码的情况,该方法可以由代码测试装置来执行,该代码测试装置可以采用硬件和/或软件的形式实现,该代码测试装置可配置于电子设备中。如图1所示,该方法包括:1 is a flowchart of a code testing method provided in Embodiment 1 of the present invention. This embodiment can be applied to a new BIOS trunk source code corresponding to a new BIOS trunk source code before the new BIOS branch source code is merged into the BIOS trunk source code. The BIOS source code, standard compatibility test is carried out to prevent the standard compatibility problem from flowing into the BIOS backbone source code in advance, the method can be performed by a code testing device, and the code testing device can be implemented in the form of hardware and/or software, The code testing device can be configured in electronic equipment. As shown in Figure 1, the method includes:
步骤101、获取用户输入的代码合并请求,所述代码合并请求携带新 BIOS分支源代码。Step 101: Obtain a code merge request input by a user, where the code merge request carries the source code of the new BIOS branch.
可选的,BIOS主干源代码是已开发完成并投入使用的BIOS源代码。通过编译器对BIOS源代码进行编译,得到BIOS代码。将BIOS代码烧录至指定电子设备的芯片中,可以通过BIOS代码为指定电子设备提供最底层的、最直接的硬件设置和控制。Optionally, the BIOS backbone source code is the BIOS source code that has been developed and put into use. The BIOS source code is compiled by the compiler to obtain the BIOS code. Burning the BIOS code into the chip of the designated electronic device can provide the lowest and most direct hardware setting and control for the designated electronic device through the BIOS code.
可选的,用户可以为开发人员。新BIOS分支源代码是开发人员新开发的,需要合入至BIOS主干源代码,从而增加BIOS新功能的新的BIOS源代码。将新BIOS分支源代码合入BIOS主干源代码,更新BIOS源代码。然后对更新后的BIOS源代码进行编译,可以得到增加某项BIOS新功能的新的BIOS代码。Optionally, the user can be a developer. The new BIOS branch source code is newly developed by the developer and needs to be merged into the BIOS main source code, thereby adding a new BIOS source code with new BIOS functions. Merge the new BIOS branch source code into the BIOS trunk source code, and update the BIOS source code. Then, the updated BIOS source code is compiled to obtain a new BIOS code that adds a new function of the BIOS.
可选的,代码合并请求用于请求将新BIOS分支源代码合入BIOS主干源代码。Optionally, the code merge request is used to request that the new BIOS branch source code be merged into the BIOS trunk source code.
可选的,所述获取用户输入的代码合并请求,所述代码合并请求携带新BIOS分支源代码,包括:通过代码合并页面,获取用户输入的代码合并请求,所述代码合并请求携带新BIOS分支源代码。Optionally, obtaining the code merge request input by the user, where the code merge request carries the source code of the new BIOS branch, includes: obtaining the code merge request input by the user through the code merge page, where the code merge request carries the new BIOS branch source code.
可选的,代码合并页面是用于与用户进行交互,获取用户输入的与 BIOS源代码相关的各类信息,并向用户展示与BIOS源代码相关的各类信息的页面。用户通过在代码合并页面中填写或选择新BIOS分支源代码,输入代码合并请求。Optionally, the code merging page is a page for interacting with the user, acquiring various information related to the BIOS source code input by the user, and displaying various information related to the BIOS source code to the user. The user enters a code merge request by filling in or selecting the new BIOS branch source code in the code merge page.
由此,可以基于与用户之间的交互操作,实时获取用户输入的代码合并请求,从而确定用户请求将新BIOS分支源代码合入BIOS主干源代码。Therefore, based on the interactive operation with the user, the code merge request input by the user can be acquired in real time, so as to determine that the user requests to merge the new BIOS branch source code into the BIOS trunk source code.
步骤102、发送控制指令至兼容性测试进程,指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果。Step 102: Send a control instruction to the compatibility test process, instruct the compatibility test process, compile the new BIOS branch source code, obtain a new BIOS branch code, and perform compatibility with the new BIOS branch code in the simulator and feedback the compatibility test results of the new BIOS branch code.
可选的,兼容性测试进程是预设的用于对新BIOS分支代码进行兼容性测试的进程。控制指令是用于指示所述兼容性测试进程,对所述新BIOS 分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS 分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果的指令。在获取用户输入的代码合并请求之后,发送控制指令至兼容性测试进程。Optionally, the compatibility testing process is a preset process for performing compatibility testing on the new BIOS branch code. The control instruction is used to instruct the compatibility test process, compile the source code of the new BIOS branch to obtain a new BIOS branch code, perform a compatibility test on the new BIOS branch code in the simulator, and feed back the Instructions for compatibility test results for the new BIOS branch code. After obtaining the code merge request input by the user, a control command is sent to the compatibility testing process.
可选的,所述指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果,包括:指示所述兼容性测试进程执行下述操作:通过编译器对所述新BIOS分支源代码进行编译;若编译成功,得到新BIOS分支代码,则在模拟器中运行所述新BIOS分支代码,并在所述新BIOS分支代码的运行过程中,调用预设的兼容性测试脚本对所述新BIOS分支代码进行兼容性测试;若所述新 BIOS分支代码通过兼容性测试,则确定所述新BIOS分支代码的兼容性测试结果为测试通过,反馈所述新BIOS分支代码的兼容性测试结果。Optionally, the instructing the compatibility testing process, compiling the source code of the new BIOS branch to obtain the new BIOS branch code, performing a compatibility test on the new BIOS branch code in the simulator, and feeding back all the codes. Describe the compatibility test result of the new BIOS branch code, including: instructing the compatibility test process to perform the following operations: compiling the new BIOS branch source code by a compiler; if the compilation is successful, the new BIOS branch code is obtained, then The new BIOS branch code is run in the simulator, and during the running process of the new BIOS branch code, a preset compatibility test script is called to perform a compatibility test on the new BIOS branch code; If the branch code passes the compatibility test, the result of the compatibility test of the new BIOS branch code is determined as passing the test, and the compatibility test result of the new BIOS branch code is fed back.
可选的,通过编译器对所述新BIOS分支源代码进行编译。若编译成功,可以得到新BIOS分支代码。新BIOS分支代码是对所述新BIOS分支源代码进行编译后得到的BIOS代码。Optionally, use a compiler to compile the source code of the new BIOS branch. If the compilation is successful, you can get the new BIOS branch code. The new BIOS branch code is a BIOS code obtained by compiling the new BIOS branch source code.
可选的,预先建立的模拟器中包含BIOS代码的运行环境,可以在模拟器中运行各类BIOS代码。Optionally, the pre-built simulator includes a running environment of BIOS codes, and various types of BIOS codes can be run in the simulator.
可选的,预设的兼容性测试脚本是用于对新BIOS分支代码进行标准兼容性测试的脚本。标准兼容性测试用于检测新BIOS分支代码中的各类接口代码的代码内容是否符合对应的接口代码规则。Optionally, the preset compatibility test script is a script used for standard compatibility test on the new BIOS branch code. The standard compatibility test is used to detect whether the code content of various interface codes in the new BIOS branch code conforms to the corresponding interface code rules.
可选的,预设的兼容性测试脚本在被调用之后,在所述新BIOS分支代码的运行过程中,监测新BIOS分支代码中的各类接口代码的运行。预设的兼容性测试脚本在监测到各类接口代码运行时,检测各类接口代码的代码内容是否符合对应的接口代码规则。若新BIOS分支代码中的各类接口代码都符合对应的接口代码规则,则确定通过兼容性测试。若新BIOS分支代码中的某一接口代码不符合对应的接口代码规则,则确定没有通过兼容性测试。Optionally, after the preset compatibility test script is invoked, during the running process of the new BIOS branch code, the operation of various types of interface codes in the new BIOS branch code is monitored. The preset compatibility test script detects whether the code content of various interface codes conforms to the corresponding interface code rules when monitoring the running of various interface codes. If all kinds of interface codes in the new BIOS branch code conform to the corresponding interface code rules, it is determined to pass the compatibility test. If a certain interface code in the new BIOS branch code does not conform to the corresponding interface code rule, it is determined that the compatibility test is not passed.
由此,通过发送控制指令至兼容性测试进程,指示兼容性测试进程,在模拟器下对新BIOS分支代码进行兼容性测试,减少了兼容性测试过程对物理机器的依赖,提高了测试环境的可移植性,也降低了测试成本。Therefore, by sending control commands to the compatibility testing process, instructing the compatibility testing process, and performing compatibility testing on the new BIOS branch code under the simulator, the dependence of the compatibility testing process on the physical machine is reduced, and the test environment is improved. Portability also reduces testing costs.
可选的,在通过编译器对所述新BIOS分支源代码进行编译之后,还包括:若编译失败,则确定所述新BIOS分支代码的兼容性测试结果为测试失败,反馈所述新BIOS分支代码的兼容性测试结果。Optionally, after compiling the source code of the new BIOS branch by the compiler, the method further includes: if the compilation fails, determining that the compatibility test result of the new BIOS branch code is a test failure, and feeding back the new BIOS branch. Code compatibility test results.
由此,在所述新BIOS分支源代码编译失败的情况下,直接则确定新 BIOS分支代码测试失败,提高测试效率,避免有缺陷的新BIOS分支源代码合入BIOS主干源代码。Thus, in the case that the compilation of the new BIOS branch source code fails, it is directly determined that the new BIOS branch code fails to be tested, thereby improving the test efficiency and preventing the defective new BIOS branch source code from being merged into the BIOS trunk source code.
可选的,在调用预设的兼容性测试脚本对所述新BIOS分支代码进行兼容性测试之后,还包括:若所述新BIOS分支代码没有通过兼容性测试,则确定所述新BIOS分支代码的兼容性测试结果为测试失败,反馈所述新 BIOS分支代码的兼容性测试结果。Optionally, after invoking a preset compatibility test script to perform a compatibility test on the new BIOS branch code, the method further includes: if the new BIOS branch code fails the compatibility test, determining the new BIOS branch code The compatibility test result is that the test fails, and the compatibility test result of the new BIOS branch code is fed back.
由此,在所述新BIOS分支代码没有通过兼容性测试的情况下,直接则确定新BIOS分支代码测试失败,提高测试效率,避免有兼容性缺陷的新 BIOS分支源代码合入BIOS主干源代码,防止了兼容性问题流入BIOS主干源代码。Therefore, in the case that the new BIOS branch code fails the compatibility test, it is directly determined that the new BIOS branch code fails the test, the test efficiency is improved, and the new BIOS branch source code with compatibility defects is prevented from being merged into the BIOS trunk source code , preventing compatibility issues from flowing into the BIOS backbone source code.
可选的,在获取用户输入的代码合并请求之前,还包括:获取用户上传的预设的兼容性测试脚本,将所述预设的兼容性测试脚本存储至预设存储位置。用户将预设的兼容性测试脚本上传至电子设备。电子设备将所述预设的兼容性测试脚本存储至预设存储位置。预设存储位置可以为电子设备中的存储器或其他存储装置。Optionally, before acquiring the code merge request input by the user, the method further includes: acquiring a preset compatibility test script uploaded by the user, and storing the preset compatibility test script in a preset storage location. The user uploads the preset compatibility test script to the electronic device. The electronic device stores the preset compatibility test script in a preset storage location. The preset storage location may be a memory or other storage device in the electronic device.
由此,将预设的兼容性测试脚本存储至预设存储位置,以使兼容性测试进程实时调用预设的兼容性测试脚本,自动对新BIOS分支代码进行兼容性测试,提供测试效率。Thus, the preset compatibility test script is stored in the preset storage location, so that the compatibility test process can call the preset compatibility test script in real time, and automatically perform compatibility test on the new BIOS branch code, thereby improving test efficiency.
步骤103、若所述兼容性测试进程反馈的兼容性测试结果为测试通过,则将所述新BIOS分支源代码合入BIOS主干源代码生成新BIOS主干源代码。Step 103: If the compatibility test result fed back by the compatibility test process is that the test is passed, the new BIOS branch source code is merged into the BIOS main source code to generate a new BIOS main source code.
可选的,所述兼容性测试进程反馈的兼容性测试结果为测试通过,表明所述新BIOS分支源代码中不存在兼容性问题,则将所述新BIOS分支源代码合入BIOS主干源代码生成新BIOS主干源代码。Optionally, the compatibility test result fed back by the compatibility test process is that the test is passed, indicating that there is no compatibility problem in the new BIOS branch source code, then the new BIOS branch source code is merged into the BIOS trunk source code Generate new BIOS backbone source code.
可选的,在将所述新BIOS分支源代码合入BIOS主干源代码生成新 BIOS主干源代码之后,还包括:通过编译器对新BIOS主干源代码进行编译,得到新BIOS代码;将新BIOS代码烧录至指定电子设备的芯片中。通过新BIOS代码为指定电子设备提供最底层的、最直接的硬件设置和控制。Optionally, after the new BIOS branch source code is merged into the BIOS trunk source code to generate the new BIOS trunk source code, the method further includes: compiling the new BIOS trunk source code with a compiler to obtain a new BIOS code; The code is burned into the chip of the specified electronic device. Provides the lowest-level, most direct hardware setup and control for specified electronic devices through the new BIOS code.
可选的,在发送控制指令至兼容性测试进程,指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果之后,还包括:若所述兼容性测试进程反馈的兼容性测试结果为测试失败,则将合并失败提示信息提供给所述用户;其中,所述合并失败提示信息用于提示所述新BIOS分支源代码与BIOS主干源代码合并失败,在所述新BIOS分支源代码修改完成后,重新输入代码合并请求。Optionally, after sending a control instruction to the compatibility test process, instructing the compatibility test process, compiling the new BIOS branch source code to obtain the new BIOS branch code, and performing the new BIOS branch code in the simulator. After the compatibility test is performed and the compatibility test result of the new BIOS branch code is fed back, the method further includes: if the compatibility test result fed back by the compatibility test process is a test failure, providing the merge failure prompt information to the The user; wherein the merging failure prompt information is used to prompt that the merging of the new BIOS branch source code and the BIOS main source code fails, and after the modification of the new BIOS branch source code is completed, re-enter the code merging request.
可选的,所述兼容性测试进程反馈的兼容性测试结果为测试失败,表明所述新BIOS分支源代码中存在兼容性问题,则自动阻塞所述新BIOS分支源代码合入BIOS主干源代码,将合并失败提示信息提供给所述用户,以使所述用户确定:所述新BIOS分支源代码与BIOS主干源代码合并失败,在所述新BIOS分支源代码修改完成后,重新输入代码合并请求。Optionally, the compatibility test result fed back by the compatibility test process is a test failure, indicating that there is a compatibility problem in the new BIOS branch source code, then automatically blocking the new BIOS branch source code from being merged into the BIOS trunk source code , providing the user with the prompt information of the merge failure, so that the user can determine that the merge of the new BIOS branch source code and the BIOS trunk source code fails, and after the modification of the new BIOS branch source code is completed, re-enter the code to merge ask.
由此,在新BIOS分支代码测试失败的情况下,自动阻塞新BIOS分支源代码合入BIOS主干源代码,避免有兼容性缺陷的新BIOS分支源代码合入BIOS主干源代码,防止了兼容性问题流入BIOS主干源代码。Therefore, in the case of a new BIOS branch code test failure, the new BIOS branch source code is automatically blocked from being merged into the BIOS trunk source code, so as to prevent the new BIOS branch source code with compatibility defects from being merged into the BIOS trunk source code, preventing compatibility. The problem flows into the BIOS backbone source code.
本发明实施例的技术方案,通过获取用户输入的代码合并请求,代码合并请求携带新BIOS分支源代码;然后发送控制指令至兼容性测试进程,指示兼容性测试进程,对新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对新BIOS分支代码进行兼容性测试,并反馈新BIOS分支代码的兼容性测试结果;若兼容性测试结果为测试通过,则将新BIOS 分支源代码合入BIOS主干源代码生成新BIOS主干源代码,解决了相关技术中的BIOS代码的测试方案,不能提前防止标准兼容性问题流入BIOS主干源代码,会占用大量的硬件资源,提高测试成本的问题,取到了在代码合并之前进行兼容性测试,实现了对BIOS主干源代码的兼容性问题的预防,防止了兼容性问题流入代码主干,真正实现了在问题发生之前就解决了BIOS代码的兼容性问题,极大地降低了兼容性问题可能带来的影响,同时通过在模拟器下进行兼容性测试,减少了兼容性测试过程对物理机器的依赖,提高了测试环境的可移植性,也降低了测试成本的有益效果。In the technical solution of the embodiment of the present invention, the code merge request input by the user is obtained, and the code merge request carries the source code of the new BIOS branch; then a control instruction is sent to the compatibility test process, indicating the compatibility test process, and the new BIOS branch source code is carried out. Compile, get the new BIOS branch code, test the compatibility of the new BIOS branch code in the simulator, and feed back the compatibility test result of the new BIOS branch code; Merge the BIOS main source code to generate a new BIOS main source code, which solves the test scheme of the BIOS code in the related technology. It cannot prevent the standard compatibility problem from flowing into the BIOS main source code in advance, which will occupy a lot of hardware resources and increase the test cost. , get the compatibility test before the code is merged, realize the prevention of the compatibility problem of the BIOS trunk source code, prevent the compatibility problem from flowing into the code trunk, and truly realize the compatibility of the BIOS code before the problem occurs. problems, which greatly reduces the possible impact of compatibility problems. At the same time, by conducting compatibility tests under the simulator, the dependence of the compatibility test process on physical machines is reduced, the portability of the test environment is improved, and the Beneficial effects of testing costs.
实施例二Embodiment 2
图2为本发明实施例二提供的一种代码测试方法的流程图,本发明实施例可以与上述一个或者多个实施例中各个可选方案结合。如图2所示,该方法包括:FIG. 2 is a flowchart of a code testing method according to Embodiment 2 of the present invention. This embodiment of the present invention may be combined with each optional solution in one or more of the foregoing embodiments. As shown in Figure 2, the method includes:
步骤201、获取用户输入的代码合并请求,所述代码合并请求携带新 BIOS分支源代码。Step 201: Obtain a code merge request input by a user, where the code merge request carries the source code of the new BIOS branch.
步骤202、发送控制指令至兼容性测试进程,指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果。Step 202: Send a control instruction to the compatibility test process, instruct the compatibility test process, compile the new BIOS branch source code to obtain a new BIOS branch code, and perform compatibility with the new BIOS branch code in the simulator and feedback the compatibility test results of the new BIOS branch code.
步骤203、若所述兼容性测试进程反馈的兼容性测试结果为测试失败,则将合并失败提示信息提供给所述用户。Step 203: If the compatibility test result fed back by the compatibility test process is that the test fails, provide the user with prompt information of merge failure.
其中,所述合并失败提示信息用于提示所述新BIOS分支源代码与BIOS 主干源代码合并失败,在所述新BIOS分支源代码修改完成后,重新输入代码合并请求。Wherein, the merging failure prompt information is used to prompt that the merging of the new BIOS branch source code and the BIOS main source code fails, and after the modification of the new BIOS branch source code is completed, a code merging request is input again.
可选的,所述兼容性测试进程反馈的兼容性测试结果为测试失败,表明所述新BIOS分支源代码中存在兼容性问题,则自动阻塞所述新BIOS分支源代码合入BIOS主干源代码,将合并失败提示信息提供给所述用户,以使所述用户确定:所述新BIOS分支源代码与BIOS主干源代码合并失败,在所述新BIOS分支源代码修改完成后,重新输入代码合并请求。Optionally, the compatibility test result fed back by the compatibility test process is a test failure, indicating that there is a compatibility problem in the new BIOS branch source code, then automatically blocking the new BIOS branch source code from being merged into the BIOS trunk source code , providing the user with the prompt information of the merge failure, so that the user can determine that the merge of the new BIOS branch source code and the BIOS trunk source code fails, and after the modification of the new BIOS branch source code is completed, re-enter the code to merge ask.
由此,在新BIOS分支代码测试失败的情况下,自动阻塞新BIOS分支源代码合入BIOS主干源代码,避免有兼容性缺陷的新BIOS分支源代码合入BIOS主干源代码,防止了兼容性问题流入BIOS主干源代码。Therefore, in the case of a new BIOS branch code test failure, the new BIOS branch source code is automatically blocked from being merged into the BIOS trunk source code, so as to prevent the new BIOS branch source code with compatibility defects from being merged into the BIOS trunk source code, preventing compatibility. The problem flows into the BIOS backbone source code.
本发明实施例的技术方案,取到了在代码合并之前进行兼容性测试,实现了对BIOS主干源代码的兼容性问题的预防,防止了兼容性问题流入代码主干,真正实现了在问题发生之前就解决了BIOS代码的兼容性问题,极大地降低了兼容性问题可能带来的影响,同时通过在模拟器下进行兼容性测试,减少了兼容性测试过程对物理机器的依赖,提高了测试环境的可移植性,也降低了测试成本的有益效果。The technical solution of the embodiment of the present invention takes the compatibility test before code merging, realizes the prevention of the compatibility problem of the BIOS main source code, prevents the compatibility problem from flowing into the code main body, and truly realizes the problem before the problem occurs. Solved the compatibility problem of BIOS code, greatly reducing the possible impact of compatibility problems. At the same time, by conducting compatibility testing under the simulator, the dependence of the compatibility testing process on physical machines is reduced, and the test environment is improved. Portability also has the beneficial effect of reducing the cost of testing.
实施例三Embodiment 3
图3为本发明实施例三提供的一种代码测试方法的流程图,包括以下步骤:3 is a flowchart of a code testing method provided in Embodiment 3 of the present invention, comprising the following steps:
步骤301、获取用户输入的代码合并请求,所述代码合并请求携带新 BIOS分支源代码。Step 301: Obtain a code merge request input by a user, where the code merge request carries the source code of the new BIOS branch.
步骤302、发送控制指令至兼容性测试进程,指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果:若所述兼容性测试进程反馈的兼容性测试结果为测试通过,则执行步骤303;若所述兼容性测试进程反馈的兼容性测试结果为测试失败,则执行步骤304。Step 302: Send a control instruction to the compatibility test process, instruct the compatibility test process, compile the new BIOS branch source code to obtain a new BIOS branch code, and perform compatibility with the new BIOS branch code in the simulator The compatibility test is performed, and the compatibility test result of the new BIOS branch code is fed back: if the compatibility test result fed back by the compatibility test process is that the test has passed, then step 303 is executed; If the test result is that the test fails,
步骤303、将所述新BIOS分支源代码合入BIOS主干源代码生成新BIOS 主干源代码。Step 303: Merge the new BIOS branch source code into the BIOS trunk source code to generate a new BIOS trunk source code.
步骤304、将合并失败提示信息提供给所述用户。
其中,所述合并失败提示信息用于提示所述新BIOS分支源代码与BIOS 主干源代码合并失败,在所述新BIOS分支源代码修改完成后,重新输入代码合并请求。Wherein, the merging failure prompt information is used to prompt that the merging of the new BIOS branch source code and the BIOS main source code fails, and after the modification of the new BIOS branch source code is completed, a code merging request is input again.
本发明实施例的技术方案,取到了在代码合并之前进行兼容性测试,实现了对BIOS主干源代码的兼容性问题的预防,防止了兼容性问题流入代码主干,真正实现了在问题发生之前就解决了BIOS代码的兼容性问题,极大地降低了兼容性问题可能带来的影响,同时通过在模拟器下进行兼容性测试,减少了兼容性测试过程对物理机器的依赖,提高了测试环境的可移植性,也降低了测试成本的有益效果。The technical solution of the embodiment of the present invention takes the compatibility test before code merging, realizes the prevention of the compatibility problem of the BIOS main source code, prevents the compatibility problem from flowing into the code main body, and truly realizes the problem before the problem occurs. Solved the compatibility problem of BIOS code, greatly reducing the possible impact of compatibility problems. At the same time, by conducting compatibility testing under the simulator, the dependence of the compatibility testing process on physical machines is reduced, and the test environment is improved. Portability also has the beneficial effect of reducing the cost of testing.
实施例四Embodiment 4
图4为本发明实施例四提供的一种代码测试装置的结构示意图。所述装置可以配置于电子设备中。如图4所示,所述装置包括:请求获取模块 401、代码测试模块402以及代码合并模块403。FIG. 4 is a schematic structural diagram of a code testing apparatus according to Embodiment 4 of the present invention. The apparatus may be configured in an electronic device. As shown in FIG. 4 , the apparatus includes: a
其中,请求获取模块401,用于获取用户输入的代码合并请求,所述代码合并请求携带新BIOS分支源代码;代码测试模块402,用于发送控制指令至兼容性测试进程,指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果;代码合并模块403,用于若所述兼容性测试进程反馈的兼容性测试结果为测试通过,则将所述新BIOS分支源代码合入BIOS主干源代码生成新BIOS 主干源代码。Wherein, the
本发明实施例的技术方案,通过获取用户输入的代码合并请求,代码合并请求携带新BIOS分支源代码;然后发送控制指令至兼容性测试进程,指示兼容性测试进程,对新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对新BIOS分支代码进行兼容性测试,并反馈新BIOS分支代码的兼容性测试结果;若兼容性测试结果为测试通过,则将新BIOS 分支源代码合入BIOS主干源代码生成新BIOS主干源代码,解决了相关技术中的BIOS代码的测试方案,不能提前防止标准兼容性问题流入BIOS主干源代码,会占用大量的硬件资源,提高测试成本的问题,取到了在代码合并之前进行兼容性测试,实现了对BIOS主干源代码的兼容性问题的预防,防止了兼容性问题流入代码主干,真正实现了在问题发生之前就解决了BIOS代码的兼容性问题,极大地降低了兼容性问题可能带来的影响,同时通过在模拟器下进行兼容性测试,减少了兼容性测试过程对物理机器的依赖,提高了测试环境的可移植性,也降低了测试成本的有益效果。In the technical solution of the embodiment of the present invention, the code merge request input by the user is obtained, and the code merge request carries the source code of the new BIOS branch; then a control instruction is sent to the compatibility test process, indicating the compatibility test process, and the new BIOS branch source code is carried out. Compile, get the new BIOS branch code, test the compatibility of the new BIOS branch code in the simulator, and feed back the compatibility test result of the new BIOS branch code; Merge the BIOS main source code to generate a new BIOS main source code, which solves the test scheme of the BIOS code in the related technology. It cannot prevent the standard compatibility problem from flowing into the BIOS main source code in advance, which will occupy a lot of hardware resources and increase the test cost. , get the compatibility test before the code is merged, realize the prevention of the compatibility problem of the BIOS trunk source code, prevent the compatibility problem from flowing into the code trunk, and truly realize the compatibility of the BIOS code before the problem occurs. problems, which greatly reduces the possible impact of compatibility problems. At the same time, by conducting compatibility tests under the simulator, the dependence of the compatibility test process on physical machines is reduced, the portability of the test environment is improved, and the Beneficial effects of testing costs.
在本发明实施例的一个可选实施方式中,可选的,代码测试模块402 在执行指示所述兼容性测试进程,对所述新BIOS分支源代码进行编译,得到新BIOS分支代码,在模拟器中对所述新BIOS分支代码进行兼容性测试,并反馈所述新BIOS分支代码的兼容性测试结果的操作时,具体用于:指示所述兼容性测试进程执行下述操作:通过编译器对所述新BIOS分支源代码进行编译;若编译成功,得到新BIOS分支代码,则在模拟器中运行所述新BIOS分支代码,并在所述新BIOS分支代码的运行过程中,调用预设的兼容性测试脚本对所述新BIOS分支代码进行兼容性测试;若所述新BIOS分支代码通过兼容性测试,则确定所述新BIOS分支代码的兼容性测试结果为测试通过,反馈所述新BIOS分支代码的兼容性测试结果。In an optional implementation of the embodiment of the present invention, optionally, the
在本发明实施例的一个可选实施方式中,可选的,在通过编译器对所述新BIOS分支源代码进行编译之后,还包括:若编译失败,则确定所述新BIOS分支代码的兼容性测试结果为测试失败,反馈所述新BIOS分支代码的兼容性测试结果。In an optional implementation manner of the embodiment of the present invention, optionally, after the new BIOS branch source code is compiled by a compiler, the method further includes: if the compilation fails, determining the compatibility of the new BIOS branch code The result of the compatibility test is that the test fails, and the compatibility test result of the new BIOS branch code is fed back.
在本发明实施例的一个可选实施方式中,可选的,在调用预设的兼容性测试脚本对所述新BIOS分支代码进行兼容性测试之后,还包括:若所述新BIOS分支代码没有通过兼容性测试,则确定所述新BIOS分支代码的兼容性测试结果为测试失败,反馈所述新BIOS分支代码的兼容性测试结果。In an optional implementation manner of the embodiment of the present invention, optionally, after calling a preset compatibility test script to perform a compatibility test on the new BIOS branch code, the method further includes: if the new BIOS branch code does not have If the compatibility test is passed, it is determined that the compatibility test result of the new BIOS branch code is a test failure, and the compatibility test result of the new BIOS branch code is fed back.
在本发明实施例的一个可选实施方式中,可选的,代码测试装置还包括:提示信息提供模块,用于若所述兼容性测试进程反馈的兼容性测试结果为测试失败,则将合并失败提示信息提供给所述用户;其中,所述合并失败提示信息用于提示所述新BIOS分支源代码与BIOS主干源代码合并失败,在所述新BIOS分支源代码修改完成后,重新输入代码合并请求。In an optional implementation manner of the embodiment of the present invention, optionally, the code testing apparatus further includes: a prompt information providing module, configured to combine the test results if the compatibility test result fed back by the compatibility test process is a test failure. The failure prompt information is provided to the user; wherein, the merge failure prompt information is used to prompt that the new BIOS branch source code and the BIOS trunk source code fail to merge, and after the modification of the new BIOS branch source code is completed, re-enter the code merge request.
在本发明实施例的一个可选实施方式中,可选的,请求获取模块401 具体用于:通过代码合并页面,获取用户输入的代码合并请求,所述代码合并请求携带新BIOS分支源代码。In an optional implementation of the embodiment of the present invention, optionally, the
在本发明实施例的一个可选实施方式中,可选的,代码测试装置还包括:脚本获取模块,用于获取用户上传的预设的兼容性测试脚本,将所述预设的兼容性测试脚本存储至预设存储位置。In an optional implementation manner of the embodiment of the present invention, optionally, the code testing apparatus further includes: a script obtaining module, configured to obtain a preset compatibility test script uploaded by a user, and use the preset compatibility test script to The script is stored to the preset storage location.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
上述代码测试装置可执行本发明任意实施例所提供的代码测试方法,具备执行代码测试方法相应的功能模块和有益效果。The above code testing apparatus can execute the code testing method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the code testing method.
实施例五Embodiment 5
图5示出了可以用来实现本发明实施例的代码测试方法的电子设备10 的结构示意图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备(如头盔、眼镜、手表等)和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/ 或者要求的本发明的实现。FIG. 5 shows a schematic structural diagram of an
如图5所示,电子设备10包括至少一个处理器11,以及与至少一个处理器11通信连接的存储器,如只读存储器(ROM)12、随机访问存储器 (RAM)13等,其中,存储器存储有可被至少一个处理器执行的计算机程序,处理器11可以根据存储在只读存储器(ROM)12中的计算机程序或者从存储单元18构建到随机访问存储器(RAM)13中的计算机程序,来执行各种适当的动作和处理。在RAM 13中,还可存储电子设备10操作所需的各种程序和数据。处理器11、ROM 12以及RAM 13通过总线14彼此相连。输入/输出(I/O)接口15也连接至总线14。As shown in FIG. 5, the
电子设备10中的多个部件连接至I/O接口15,包括:输入单元16,例如键盘、鼠标等;输出单元17,例如各种类型的显示器、扬声器等;存储单元18,例如磁盘、光盘等;以及通信单元19,例如网卡、调制解调器、无线通信收发机等。通信单元19允许电子设备10通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Various components in the
处理器11可以是各种具有处理和计算能力的通用和/或专用处理组件。处理器11的一些示例包括但不限于中央处理单元(CPU)、图形处理单元 (GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的处理器、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。处理器11执行上文所描述的各个方法和处理,例如代码测试方法。The
在一些实施例中,代码测试方法可被实现为计算机程序,其被有形地包含于计算机可读存储介质,例如存储单元18。在一些实施例中,计算机程序的部分或者全部可以经由ROM 12和/或通信单元19而被载入和/或安装到电子设备10上。当计算机程序构建到RAM 13并由处理器11执行时,可以执行上文描述的代码测试方法的一个或多个步骤。备选地,在其他实施例中,处理器11可以通过其他任何适当的方式(例如,借助于固件) 而被配置为执行代码测试方法。In some embodiments, the code testing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/ 或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein above may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor The processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.
用于实施本发明的代码测试方法的计算机程序可以采用一个或多个编程语言的任何组合来编写。这些计算机程序可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,使得计算机程序当由处理器执行时使流程图和/或框图中所规定的功能/操作被实施。计算机程序可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Computer programs for implementing the code testing methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/operations specified in the flowcharts and/or block diagrams to be carried out. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本发明的上下文中,计算机可读存储介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的计算机程序。计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。备选地,计算机可读存储介质可以是机器可读信号介质。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in connection with the instruction execution system, apparatus or device. Computer-readable storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在电子设备上实施此处描述的系统和技术,该电子设备具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给电子设备。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having a display device (eg, a CRT (cathode ray tube) or an LCD (liquid crystal display)) for displaying information to the user monitor); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、区块链网络和互联网。The systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user's computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the Internet.
计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。A computing system can include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or a cloud host. It is a host product in the cloud computing service system to solve the traditional physical host and VPS services, which are difficult to manage and weak in business scalability. defect.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, the steps described in the present invention can be performed in parallel, sequentially or in different orders, and as long as the desired results of the technical solutions of the present invention can be achieved, no limitation is imposed herein.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210472290.4A CN115080382A (en) | 2022-04-29 | 2022-04-29 | Code testing method, device, equipment and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210472290.4A CN115080382A (en) | 2022-04-29 | 2022-04-29 | Code testing method, device, equipment and medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115080382A true CN115080382A (en) | 2022-09-20 |
Family
ID=83247427
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210472290.4A Pending CN115080382A (en) | 2022-04-29 | 2022-04-29 | Code testing method, device, equipment and medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115080382A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024113128A1 (en) * | 2022-11-29 | 2024-06-06 | Huawei Cloud Computing Technologies Co., Ltd. | A code branch managing system for comparing and/or updating a master code branch with a new code branch |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101470657A (en) * | 2007-12-28 | 2009-07-01 | 英业达股份有限公司 | Verification method for BIOS refreshing content |
| CN109960643A (en) * | 2017-12-22 | 2019-07-02 | 网宿科技股份有限公司 | A kind of code test method and device |
| CN112947986A (en) * | 2020-09-29 | 2021-06-11 | 深圳市明源云科技有限公司 | Multi-version code sign-in control method and device, client and storage medium |
-
2022
- 2022-04-29 CN CN202210472290.4A patent/CN115080382A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101470657A (en) * | 2007-12-28 | 2009-07-01 | 英业达股份有限公司 | Verification method for BIOS refreshing content |
| CN109960643A (en) * | 2017-12-22 | 2019-07-02 | 网宿科技股份有限公司 | A kind of code test method and device |
| CN112947986A (en) * | 2020-09-29 | 2021-06-11 | 深圳市明源云科技有限公司 | Multi-version code sign-in control method and device, client and storage medium |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024113128A1 (en) * | 2022-11-29 | 2024-06-06 | Huawei Cloud Computing Technologies Co., Ltd. | A code branch managing system for comparing and/or updating a master code branch with a new code branch |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7209034B2 (en) | Edge computing test method, apparatus, equipment and readable storage medium | |
| US11836072B2 (en) | Risk-based root cause identification methods and related autobuild systems | |
| CN113778849B (en) | Method, apparatus, device and storage medium for testing code | |
| CN110532185B (en) | Test method, test device, electronic equipment and computer readable storage medium | |
| CN112328301B (en) | Method and device for maintaining consistency of operating environments, storage medium and electronic equipment | |
| CN111309343A (en) | Development deployment method and device | |
| CN117724980A (en) | Method and device for testing software framework performance, electronic equipment and storage medium | |
| CN116795701A (en) | A method and device for generating universal test instances of interface programs | |
| CN116244703A (en) | Method and apparatus for fuzz testing | |
| CN114217848B (en) | Dependency processing method, device, electronic device and computer storage medium | |
| CN112416746A (en) | Test case generation method, device, equipment and medium | |
| CN115080382A (en) | Code testing method, device, equipment and medium | |
| CN113254340B (en) | A method and device for generating test cases | |
| CN110609786A (en) | Software testing method and device, computer equipment and storage medium | |
| CN112988578A (en) | An automated testing method and device | |
| CN116185874A (en) | Test report generation method, device, equipment and storage medium | |
| CN114168150B (en) | Application compilation method, device, electronic device and storage medium | |
| CN114968261B (en) | Application program compilation method and device | |
| CN114741294A (en) | Page debugging method, device, equipment and storage medium | |
| CN110795330A (en) | Monkey pressure testing method and device | |
| CN114519004A (en) | Stability testing method, device, equipment and medium for application software | |
| CN114879982A (en) | Software installation method, device, electronic device and storage medium | |
| CN114116499A (en) | Method, apparatus, device and storage medium for evaluating code quality | |
| CN114356745A (en) | Software testing method and device, electronic equipment and computer readable storage medium | |
| CN118502814B (en) | Software modification evaluation method, device, equipment and medium based on byte codes |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |