Automatic test method and platform for intelligent card and storage medium
By analyzing project files and extracting basic technical indicators of smart cards, and automatically configuring testing tools and card readers, the problem of insufficient flexibility in existing smart card testing methods is solved, and efficient and accurate automated testing is achieved.
Patent Information
- Application Number
- CN202411927642.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-06
AI Technical Summary
The existing smart card testing methods lack flexibility and are difficult to quickly adapt to different types of smart cards and multiple test needs, resulting in low testing efficiency and long time.
By analyzing the engineering files in the automated test library, extracting the basic technical indicators of the target test smart card, determining the adaptive testing tools and card readers, automatically configuring the test parameters and issuing test tasks to the test engine, and automatically executing tests and generating test reports.
It realizes flexible adaptation of the automated test engine, provides personalized testing solutions, ensures that it meets the testing needs of multiple smart cards, and improves testing efficiency and accuracy.
Smart Images

Figure CN119938521A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automated testing technology, and in particular to an automated testing method, platform and storage medium for smart cards. Background Art
[0002] With the rapid development of information technology, smart cards have been widely used in finance, communications, transportation, medical and other fields. Their role in payment, identity authentication, data protection and other aspects is becoming increasingly important. A smart card is a card with a built-in chip that can store and process information and perform security operations such as encryption. The core technology of smart cards involves operating systems, communication protocols, encryption algorithms, physical and logical security, etc. These factors determine their performance and security.
[0003] In order to ensure the normal operation and efficient performance of smart cards, automated testing methods have gradually become an indispensable means in the research and development, production and application of smart cards. Through automated testing, the performance of smart cards in different usage scenarios can be efficiently evaluated, and potential problems can be discovered and solved. However, existing smart card testing methods generally have problems such as low efficiency, lack of flexibility, and single testing scenarios. For example, traditional testing methods often rely on semi-automated tools, and the test content and methods are relatively fixed, resulting in low test efficiency and a long time consumption. Summary of the invention
[0004] The present application provides an automated testing method, platform and storage medium for smart cards, which solves the technical problems that the prior art testing tools and methods lack flexibility and are difficult to quickly adapt to different types of smart cards and multiple testing requirements, resulting in low testing efficiency and long testing time. The application achieves the technical effect of parsing engineering files and automatically configuring testing tools and card readers. The test engine can automatically execute test tasks, flexibly adapt to different testing tools and test environments, provide personalized testing solutions, and ensure adaptation to the testing needs of multiple smart cards.
[0005] In view of the above problems, on the one hand, the present application provides an automated testing method for smart cards, the method comprising: parsing the engineering files in the automated testing library, extracting the basic technical indicators corresponding to the target test smart card; determining the adaptation test tool and the adaptation card reader based on the engineering files and the basic technical indicators; parsing the test script through regular expressions, and marking the available test cases; after receiving the test confirmation instruction issued by the user end, configuring the test parameters in the available test cases according to the adaptation test tool and the adaptation card reader, and issuing the test task to the test engine; the test engine automatically executes the test, and generates a test report after the test is completed, and the test report includes the test results.
[0006] On the other hand, the present application also provides an automated testing platform for smart cards, which includes: an index extraction module, which is used to parse the engineering files in the automated testing library and extract the basic technical indicators corresponding to the target test smart card, wherein the basic technical indicators include data transmission rate, encoding mode, physical parameters, and logical parameters; an adaptation module, which is used to determine the adaptation test tool and the adaptation card reader based on the engineering files and the basic technical indicators; a marking module, which is used to parse the test script through regular expressions and mark the available test cases; a parameter configuration module, which is used to configure the test parameters in the available test cases according to the adaptation test tool and the adaptation card reader after receiving the test confirmation instruction issued by the user end, and send the test task to the test engine; a test module, which is used for the test engine to automatically execute the test, and generate a test report after the test is completed, and the test report includes the test results.
[0007] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in the above-mentioned automated testing method for smart cards.
[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0009] Parse the project files, extract basic technical indicators, determine the adapter test tools and adapter card readers; mark the available test cases; after receiving the test confirmation instructions, configure the test parameters according to the adapter test tools and adapter card readers, and send the test tasks to the test engine; the test engine automatically executes the test, and generates a test report after the test is completed. This application has achieved the technical effect of parsing project files and automatically configuring test tools and card readers. The test engine can automatically execute test tasks, flexibly adapt to different test tools and test environments, and provide personalized test solutions to ensure that it meets the testing needs of various smart cards.
[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 A flowchart of an automated testing method for a smart card provided in an embodiment of the present application.
[0012] Figure 2 A schematic diagram of the structure of an automated testing platform for smart cards provided in an embodiment of the present application.
[0013] Explanation of the reference numerals: index extraction module 10 , adaptation module 20 , marking module 30 , parameter configuration module 40 , testing module 50 . DETAILED DESCRIPTION
[0014] The embodiments of the present application provide an automated testing method, platform and storage medium for smart cards, thereby solving the technical problems that the prior art testing tools and methods lack flexibility and are difficult to quickly adapt to different types of smart cards and multiple testing requirements, resulting in low testing efficiency and long testing time. The embodiments of the present application achieve the technical effect of parsing project files and automatically configuring testing tools and card readers. The test engine can automatically execute test tasks, flexibly adapt to different testing tools and test environments, provide personalized testing solutions, and ensure adaptation to the testing requirements of multiple smart cards.
[0015] Embodiment 1, as Figure 1 As shown, an embodiment of the present application provides an automated testing method for a smart card, the method comprising:
[0016] Step S1: parse the engineering files in the automated test library and extract the basic technical indicators corresponding to the target test smart card; Step S2: determine the adaptation test tool and the adaptation card reader based on the engineering files and the basic technical indicators; Step S3: parse the test script through regular expressions and mark the available test cases.
[0017] Specifically, the engineering files stored in the automated test library are analyzed and interpreted to extract basic information and parameters related to smart card testing. The automated test library usually contains a series of scripts, configuration files and test data for testing. The engineering files include data in XML, JSON or other formats, which define the framework and requirements of the test; basic technical indicators refer to the key parameters of the smart card in terms of performance and function, such as data transmission rate, physical parameters (such as size, voltage, etc.) and logical parameters (such as the operating system version of the smart card, supported command set, etc.).
[0018] Adapting test tools and card readers refers to selecting appropriate test tools and card readers based on the technical indicators of smart cards to ensure the compatibility and effectiveness of the test. Test tools may include software or hardware for simulating transactions, while card readers are devices used to communicate with smart cards. Regular expressions are a text pattern description tool used to identify complex patterns in strings. In test scripts, regular expressions can be used to identify and mark available test cases, that is, those that meet specific patterns or conditions, thereby preparing for subsequent test execution.
[0019] Use specialized parsing tools or scripting languages (such as Python) to read and parse engineering files in the automated test library, identify specific tags or keywords in the files, and extract the technical indicators of the smart card to ensure the accuracy and effectiveness of the test; select the most appropriate test tools and card readers based on the extracted technical indicators through a decision algorithm or matching system, taking into account factors such as the reader's communication protocol, supported card types, and operating system compatibility; adapting the correct test tools and card readers is crucial to ensuring the smooth progress of the test. Wrong choices may lead to test failures or inaccurate results, affecting the efficiency and reliability of the entire test process; write regular expressions to match specific patterns in the test scripts. These patterns may represent the start, end, or specific conditions of the test case. Through these expressions, the system can automatically identify and mark available test cases, improving the level of automation in test case management and ensuring that the selection of test cases is both fast and accurate.
[0020] Step S4: After receiving the test confirmation instruction issued by the user end, configure the test parameters in the available test case according to the adaptation test tool and the adaptation card reader, and send the test task to the test engine; Step S5: The test engine automatically executes the test, and the test is completed and a test report is generated, and the test report includes the test results.
[0021] Specifically, a test confirmation instruction refers to an instruction issued by a user through a certain interface (which may be a graphical interface or a command line) to confirm that the test parameters have been set and that the test can be started. It is an important node in the test process, marking the end of the test preparation phase and the beginning of the test execution phase; after determining the appropriate test tools and card readers, it is necessary to configure the parameters in the available test cases, where the test parameters in the available test cases include the test input data, expected results, test environment settings, etc.; issuing a test task means sending the configured test cases and parameters to the test engine, which is the component responsible for executing test cases and collecting test results; the test engine is the core component in the automated testing system, which automatically executes test cases according to the issued tasks and records various data and results during the test; a test report is a document generated after the test is executed, which summarizes the test results and related data, and provides a basis for test evaluation and problem diagnosis.
[0022] After the user confirms that the test configuration is correct through the user-side interface, the system will automatically fill in or prompt the user to fill in the parameters required for the test case based on the previously determined adaptation test tools and card readers. After these parameters are configured, the system sends these test tasks to the test engine and prepares for execution, ensuring that the test tasks can be correctly issued according to the preset conditions and parameters, laying the foundation for the automated execution of the test.
[0023] After receiving the test task, the test engine will automatically execute the test case according to the configured parameters. During the test, the engine will record the execution status and results of the test, including the success or failure status and any exception or error information. After the test is completed, the engine will summarize this data and generate a test report. Automatic test execution and test report generation greatly improve the efficiency and accuracy of testing. The test report provides developers and testers with detailed test results, helping them quickly locate problems, evaluate software quality, and guide subsequent development and optimization work.
[0024] Furthermore, the present application method also includes:
[0025] The basic technical indicators corresponding to the target test smart card include data transmission rate; key performance indicators are extracted during each test, and the key performance indicators include average response time and maximum throughput; for failure test cases whose test results fail the corresponding failure test cases, the first adaptability network layer is formulated based on the data transmission rate and the key performance indicators.
[0026] Specifically, basic technical indicators refer to the minimum performance standards that smart cards must meet during design and use. These indicators directly affect the functions and performance of smart cards. For smart cards, data transmission rate is a key basic technical indicator, which determines the speed of data exchange between smart cards and card readers; key performance indicators refer to specific parameters used to evaluate smart card performance during the test process, such as average response time and maximum throughput. The average response time refers to the average response speed of the smart card to requests, while the maximum throughput refers to the maximum amount of data that the smart card can process per unit time; failure test cases refer to those test results that do not meet expectations, indicating that the smart card fails to meet the requirements in some aspects; the first adaptability network layer is a network layer adjusted according to the data transmission rate and key performance indicators of the smart card, which optimizes the data exchange efficiency between the smart card and the network and ensures that the smart card can achieve optimal performance in different network environments.
[0027] Before testing a smart card, its basic technical indicators need to be determined. Data transmission rate is an important parameter, which usually involves consulting the technical specifications of the smart card or determining it through testing. Data transmission rate is a key factor in evaluating smart card performance, which directly affects the response speed and user experience of smart cards in actual applications. In automated testing, understanding this indicator helps to select appropriate test tools and set correct test parameters.
[0028] During the test execution, the test engine will monitor and record the performance of the smart card in real time, including the average response time for each transaction and the maximum throughput under high load. These key performance indicators are important data for evaluating the performance of the smart card. They can be used to determine whether the smart card meets the performance requirements and how it performs in actual applications. These data are crucial for performance tuning and problem diagnosis.
[0029] When some test cases fail, analyze the reasons for the failure of these test cases, and adjust the configuration of the network layer in combination with the data transmission rate and key performance indicators of the smart card to improve the performance of the smart card. By formulating the first adaptability network layer, the performance problems of the smart card in a specific network environment can be solved in a targeted manner, and the compatibility and stability of the smart card can be improved. This is very important for ensuring that the smart card can provide reliable services in a variety of application scenarios.
[0030] Furthermore, the present application method also includes:
[0031] The basic technical indicators corresponding to the target test smart card include physical parameters; marking the sensing area of the adapter card reader; based on the physical parameters and the sensing area of the adapter card reader, adjusting the positioning of the target test smart card and formulating a second adaptability network layer.
[0032] Specifically, physical parameters refer to the physical characteristics of smart cards, such as size, weight, voltage level, contact type (contact or contactless), etc., which are crucial to the physical compatibility and operating environment of smart cards; the sensing area of the adapter reader refers to the specific area where the reader can recognize and read smart card signals. For contactless smart cards, this usually refers to the radio frequency (RF) field range of the reader; in smart card testing, positioning adjustment refers to adjusting the position of the smart card in the test environment according to the physical parameters of the smart card and the reader to ensure that the smart card can be correctly identified and communicated by the reader; the second adaptability network layer is a network layer optimized based on the physical parameters of the smart card and the sensing area of the reader to ensure that the smart card can effectively communicate with the reader under different physical conditions.
[0033] Before testing a smart card, its physical parameters need to be determined, which may include the size, shape, operating voltage, etc. of the smart card. These parameters can be obtained by referring to the technical manual of the smart card or by actual measurement. In the test setting of the card reader, the sensing area needs to be clearly marked, that is, the area where the card reader can recognize the smart card signal. This usually needs to be determined according to the technical specifications of the card reader. Marking the sensing area helps to correctly place the smart card during the test process to ensure that the communication between the smart card and the card reader is not affected by improper position.
[0034] During the test, the position of the smart card is adjusted according to the physical parameters of the smart card and the sensing area of the card reader so that it is within the optimal sensing area of the card reader. At the same time, based on these parameters and adjustment results, a second adaptive network layer is formulated to optimize the communication between the smart card and the card reader. By positioning the smart card and formulating the second adaptive network layer, the accuracy of the test and the communication efficiency of the smart card in actual applications can be improved, especially the compatibility and stability in a variety of physical environments.
[0035] Furthermore, the present application method also includes:
[0036] The basic technical indicators corresponding to the target test smart card include logical parameters; the test environment and command set are determined according to the operating system version built into the target test smart card; based on the physical parameters, the test environment and the command set, combined with the first adaptability network layer and the second adaptability network layer, a test execution framework is constructed.
[0037] Specifically, logical parameters refer to the software and functional characteristics of the smart card, such as the built-in operating system version, supported file system, security features, etc. These parameters determine the logical functions and operation modes of the smart card; operating system version refers to the built-in operating system (COS) version of the smart card, which controls the operation and interactive behavior of the smart card. Different operating system versions may support different commands and functions; test environment refers to the hardware and software configuration required for smart card testing, including card readers, computer systems, network environments, etc., as well as specific test software and tools; command set refers to the set of commands supported by the smart card operating system. These commands are used to control the smart card to perform specific operations, such as reading data, writing data, performing security operations, etc.; the test execution framework is a software architecture used to organize and manage the test process, including the execution of test cases, the collection of results, and the generation of reports.
[0038] Before testing a smart card, its logical parameters need to be determined, which usually involves querying the smart card's technical documentation or using specific diagnostic tools to obtain information such as the smart card's operating system version and supported command sets. Logical parameters are the basis for understanding the functions and limitations of smart cards and determining the test environment and command sets, which directly affects the formulation of test strategies and the design of test cases.
[0039] Depending on the operating system version of the smart card, select a compatible test environment and command set, which involves installing specific software drivers, configuring network settings, or selecting specific test commands; ensuring that the test environment and command set are compatible with the operating system version of the smart card is a prerequisite for effective testing. Mismatched environments or command sets may cause test failures or produce erroneous test results.
[0040] Taking into account the physical parameters, test environment, command set and two adaptive network layers of the smart card, a test execution framework is designed and constructed. This framework needs to be able to support the test process of the smart card, including the execution of test cases, the collection of results and the generation of reports. The test execution framework is the core of automated testing, ensuring the orderly progress of the test process and being able to adapt to different test requirements and environments. By building a test framework that comprehensively considers the physical parameters and network layers, the flexibility and efficiency of the test are improved, and the accuracy and reliability of the test results are ensured.
[0041] Furthermore, the key performance indicators during each test are extracted, and the method of the present application further includes:
[0042] Collect multi-dimensional performance data during each test; formulate a performance fluctuation baseline based on the performance fluctuation trend; and determine the key performance indicators based on the multi-dimensional performance data and comparing it with the performance fluctuation baseline.
[0043] Specifically, multi-dimensional performance data refers to performance-related data collected from different angles and levels, such as response time, throughput, error rate, resource usage, etc. These data can comprehensively reflect the performance of the smart card during the test; performance fluctuation trend refers to the changing trend of performance data during the test, which may include rising, falling or stable states. Analyzing these trends helps to understand the performance changes of smart cards under different conditions; the performance fluctuation baseline is a reference standard used to measure the normal fluctuation range of performance data. By comparing with the baseline, performance anomalies or areas that need optimization can be identified; key performance indicators are extracted from multi-dimensional performance data and can significantly affect the performance of smart cards and user experience. These indicators usually include average response time, maximum throughput, etc.
[0044] During the test execution process, performance monitoring tools or scripts are used to collect real-time performance data of smart cards. These tools can record the response time of each transaction, the number of transactions processed, the usage of system resources, etc. The purpose of collecting multi-dimensional performance data is to comprehensively evaluate the performance of smart cards under different test conditions. These data are the basis for subsequent analysis and optimization.
[0045] Analyze the collected performance data, identify the range of normal performance fluctuations, and set a performance fluctuation baseline accordingly. This baseline can be a fixed value or a dynamically changing range. The performance fluctuation baseline provides a reference standard for performance evaluation. By comparing with the baseline, performance anomalies can be more easily identified, so that corresponding optimization measures can be taken.
[0046] Compare the collected multi-dimensional performance data with the performance fluctuation baseline to find out the data points that exceed the baseline range. These data points indicate that the smart card has performance bottlenecks or problems in some aspects. By comparing with the performance fluctuation baseline, it can be determined which performance indicators are critical and require special attention, which helps to prioritize the issues that have the greatest impact on smart card performance and improve overall performance.
[0047] Further, based on the multi-dimensional performance data, the performance fluctuation baseline is compared to determine the key performance indicator, and the method of the present application further includes:
[0048] Based on the performance fluctuation trend, a dynamic threshold interval is added; based on the multi-dimensional performance data, a deviation analysis is performed according to the dynamic threshold interval to calculate the degree of deviation; and the key performance indicator is determined according to the degree of deviation.
[0049] Specifically, the dynamic threshold interval refers to the acceptable range of performance indicators that are dynamically adjusted according to the performance fluctuation trend. This interval is not fixed, but can be adjusted according to real-time performance data to adapt to different test conditions and environmental changes; deviation analysis is a statistical method used to analyze the difference between actual performance data and expected performance. Through deviation analysis, abnormal changes in performance data can be identified; the degree of deviation refers to the difference between the performance data and the dynamic threshold interval. The calculation of the degree of deviation can help determine whether the performance data is within an acceptable range and the degree of deviation.
[0050] Analyze the performance fluctuation trend, determine the normal fluctuation range of performance data, and set the dynamic threshold interval accordingly. This interval can be adjusted according to changes in the test environment, time or other factors. The dynamic threshold interval makes performance monitoring more flexible and adaptable, and can adjust performance expectations according to real-time data, thereby more accurately identifying performance problems.
[0051] Use statistical tools or algorithms to analyze the collected multi-dimensional performance data, compare the data with the dynamic threshold interval, calculate the deviation of each data point from the threshold interval, and determine the degree of deviation. Deviation analysis helps to identify outliers and trend changes in performance data. By calculating the degree of deviation, the impact of performance problems can be quantified, providing a basis for subsequent performance optimization.
[0052] Based on the results of the deviation analysis, identify the performance data points with the largest deviation. These data points may indicate key performance indicators. For example, if the response time has the largest deviation, then the response time may be a key performance indicator. By determining the key performance indicators by the degree of deviation, performance bottlenecks and optimization points can be more accurately located, thereby improving the performance and reliability of smart cards. Through the above steps, the performance of smart cards can be more effectively monitored and analyzed, performance problems can be discovered and resolved in a timely manner, and smart cards can be ensured to provide stable and efficient services under various conditions.
[0053] Further, based on the physical parameters, the test environment and the command set, in combination with the first adaptive network layer and the second adaptive network layer, a test execution framework is constructed, and the method of the present application also includes:
[0054] Introducing custom test requirements; based on the physical parameters, the test environment and the command set, configuring custom test scenarios and custom command sets according to the custom test requirements.
[0055] Based on the custom test scenario and the custom command set, a plug-in architecture is adopted to integrate with the test execution framework.
[0056] Specifically, custom test requirements refer to test conditions and objectives defined based on specific application scenarios or user-specific requirements, which may include specific performance indicators, security requirements or compatibility tests; custom test scenarios are test environments and conditions designed based on custom test requirements, simulating situations that may be encountered in actual applications to verify the performance of smart cards in these specific scenarios; custom command sets refer to a series of commands specially defined to meet custom test requirements, which are used to control smart cards to perform specific operations or tests; plug-in architecture is a software design pattern that allows the functions of the main program to be extended or modified through plug-ins (i.e., independent software components). In the field of testing, the plug-in architecture allows flexible addition or replacement of test functions to adapt to different testing requirements.
[0057] Communicate with users to understand their specific test requirements. Customized test requirements involve specific functions, performance standards or security features of smart cards. Introducing customized test requirements makes the test plan more in line with the user's actual application scenarios, improving the pertinence and effectiveness of the test. Based on the physical parameters of the smart card, the preset test environment and command set, combined with the user's customized test requirements, design and configure specific test scenarios and command sets, including setting specific test parameters, simulating specific operating conditions or defining new test commands. Configuring customized test scenarios and command sets enables the test to simulate specific situations that users are concerned about, thereby more accurately evaluating the performance and functions of smart cards.
[0058] Developing or selecting corresponding plug-ins to implement custom test scenarios and command sets, and integrating these plug-ins into the test execution framework involves programming work to ensure that the plug-ins can work seamlessly with the main test framework. Furthermore, the use of a plug-in architecture can improve the flexibility and scalability of the test system, allowing the test execution framework to easily adapt to new test requirements without large-scale modifications. This architecture is also easy to maintain and upgrade, because each plug-in is responsible for a specific function and can be updated independently of other parts. By introducing custom test requirements and adopting a plug-in architecture, the test solution can more flexibly adapt to different test scenarios and requirements, providing users with more personalized and comprehensive testing services.
[0059] Furthermore, a plug-in architecture is adopted and integrated with the test execution framework, and the method of the present application also includes:
[0060] Obtain security feature indicators associated with the target test smart card; based on the security feature indicators, after the custom test plug-in is integrated, update security vulnerability scanning parameters, the security vulnerability scanning parameters including scanning range, scanning depth, and scanning speed.
[0061] Specifically, security feature indicators refer to security-related parameters and performance indicators in smart cards, such as the strength of encryption algorithms, security authentication mechanisms, anti-attack capabilities, etc. These indicators are key factors in evaluating the security of smart cards; custom test plug-ins refer to software components developed to meet specific testing requirements, which can be integrated into the test execution framework to provide additional testing functions or enhance existing functions; security vulnerability scanning parameters refer to the parameters that need to be configured when performing security vulnerability scanning, including the scope of the scan (i.e. the scanned objects and environment), the depth of the scan (i.e. the degree of detail of the scan), and the speed of the scan (i.e. the execution speed of the scan).
[0062] Identify and obtain smart card security feature indicators through smart card technical documents, security specifications or use special security testing tools; understand smart card security feature indicators for designing effective security tests, these indicators can help testers determine the focus of the test; after the custom test plug-in is developed, configure or update security vulnerability scanning parameters according to the smart card security feature indicators, which involves adjusting the settings of the scanning tool to ensure that the scan can cover all key security aspects of the smart card. Furthermore, updating the security vulnerability scanning parameters can ensure the comprehensiveness and effectiveness of security testing, so that the test can be carried out on the specific security features of the smart card, and improve the ability to discover potential security issues.
[0063] When configuring a security vulnerability scanning tool, you need to set the specific scope of the scan (e.g. which parts of the smart card need to be scanned), the depth of the scan (e.g. whether in-depth code analysis is required), and the speed of the scan (e.g. the execution speed of the scan, which may require a trade-off between speed and detail); reasonable configuration of the scan scope, depth, and speed can optimize the performance and results of security testing, ensuring that the most comprehensive security checks are performed within limited resources and time, while avoiding excessive consumption of system resources. Through the above steps, it can be ensured that the security testing of smart cards is both comprehensive and efficient, and potential security vulnerabilities can be discovered and repaired in a timely manner, thereby improving the overall security of smart cards.
[0064] In summary, the automated testing method for smart cards provided in the embodiments of the present application has the following technical effects:
[0065] Parse the engineering files in the automated test library and extract the basic technical indicators corresponding to the target test smart card; determine the adaptation test tool and the adaptation card reader based on the engineering files and the basic technical indicators; parse the test script through regular expressions and mark the available test cases; after receiving the test confirmation instruction issued by the user end, configure the test parameters in the available test cases according to the adaptation test tool and the adaptation card reader, and send the test task to the test engine; the test engine automatically executes the test, and generates a test report after the test is completed, and the test report includes the test results. The engineering files are parsed and the test tools and card readers are automatically configured. The test engine can automatically execute the test tasks, flexibly adapt to different test tools and test environments, provide personalized test solutions, and ensure the technical effect of adapting to the test needs of various smart cards.
[0066] Embodiment 2, as Figure 2 As shown, based on the same inventive concept of the automated testing method for smart cards in the aforementioned embodiment 1, the present application also provides an automated testing platform for smart cards, the platform comprising:
[0067] The index extraction module 10 is used to parse the engineering files in the automated test library and extract the basic technical indicators corresponding to the target test smart card, wherein the basic technical indicators include data transmission rate, encoding mode, physical parameters, and logical parameters; the adaptation module 20 is used to determine the adaptation test tool and the adaptation card reader based on the engineering files and the basic technical indicators; the marking module 30 is used to parse the test script through regular expressions and mark the available test cases; the parameter configuration module 40 is used to configure the test parameters in the available test cases according to the adaptation test tool and the adaptation card reader after receiving the test confirmation instruction issued by the user end, and send the test task to the test engine; the test module 50 is used for the test engine to automatically execute the test, and generate a test report after the test is completed, and the test report includes the test results.
[0068] Furthermore, the embodiments of the present application include:
[0069] The basic technical indicators corresponding to the target test smart card include data transmission rate; key performance indicators are extracted during each test, and the key performance indicators include average response time and maximum throughput; for failure test cases whose test results fail the corresponding failure test cases, the first adaptability network layer is formulated based on the data transmission rate and the key performance indicators.
[0070] Furthermore, the embodiments of the present application include:
[0071] The basic technical indicators corresponding to the target test smart card include physical parameters; marking the sensing area of the adapter card reader; based on the physical parameters and the sensing area of the adapter card reader, adjusting the positioning of the target test smart card and formulating a second adaptability network layer.
[0072] Furthermore, the embodiments of the present application include:
[0073] The basic technical indicators corresponding to the target test smart card include logical parameters; the test environment and command set are determined according to the operating system version built into the target test smart card; based on the physical parameters, the test environment and the command set, combined with the first adaptability network layer and the second adaptability network layer, a test execution framework is constructed.
[0074] Furthermore, the embodiments of the present application include:
[0075] The method includes collecting multi-dimensional performance data during each test; formulating a performance fluctuation baseline according to the performance fluctuation trend; and determining the key performance indicators based on the multi-dimensional performance data and comparing it with the performance fluctuation baseline.
[0076] Furthermore, the embodiments of the present application include:
[0077] Based on the performance fluctuation trend, a dynamic threshold interval is added; based on the multi-dimensional performance data, a deviation analysis is performed according to the dynamic threshold interval to calculate the degree of deviation; and the key performance indicator is determined according to the degree of deviation.
[0078] Furthermore, the embodiment of the present application also includes:
[0079] Introducing custom test requirements; based on the physical parameters, the test environment and the command set, configuring custom test scenarios and custom command sets according to the custom test requirements.
[0080] Based on the custom test scenario and the custom command set, a plug-in architecture is adopted to integrate with the test execution framework.
[0081] Furthermore, the embodiment of the present application also includes:
[0082] Obtain security feature indicators associated with the target test smart card; based on the security feature indicators, after the custom test plug-in is integrated, update security vulnerability scanning parameters, the security vulnerability scanning parameters including scanning range, scanning depth, and scanning speed.
[0083] Through the above detailed description of the automated testing method for smart cards in this specification, those skilled in the art can clearly understand the automated testing platform for smart cards in this embodiment. For the platform disclosed in the second embodiment, since it corresponds to the method disclosed in the first embodiment and has corresponding functional modules and beneficial effects, the relevant parts can be referred to the description of the method part.
[0084] Embodiment three, based on the same inventive concept of the automated testing method for smart cards in the aforementioned embodiment one, the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the various steps of the aforementioned automated testing method for smart cards embodiment are implemented, and the same technical effects can be achieved. To avoid repetition, they will not be described here.
[0085] The above description of the disclosed embodiments enables professional and technical personnel in the field to implement or use the present application. Various modifications to these embodiments will be obvious to professional and technical personnel in the field. The general principles defined in this document can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown in this document, but will conform to the widest scope consistent with the principles and novel features disclosed in this document.
Claims
1. An automated testing method for a smart card, characterized in that: The method comprises: Parse the engineering files in the automated test library and extract the basic technical indicators corresponding to the target test smart card; Based on the engineering documents and the basic technical indicators, determine the adaptation test tool and the adaptation card reader; Parse test scripts through regular expressions and mark available test cases; After receiving the test confirmation instruction sent by the user end, configure the test parameters in the available test case according to the adaptation test tool and the adaptation card reader, and send the test task to the test engine; The test engine automatically executes the test, and generates a test report after the test is completed. The test report includes the test results.
2. The method according to claim 1, characterized in that The basic technical indicators corresponding to the target test smart card include data transmission rate; Extracting key performance indicators during each test, wherein the key performance indicators include average response time and maximum throughput; For the failure test cases whose test results are failure to pass the corresponding test cases, a first adaptability network layer is formulated according to the data transmission rate and the key performance indicators.
3. The method according to claim 2, characterized in that The basic technical indicators corresponding to the target test smart card include physical parameters; Marking the sensing area of the adapter reader; Based on the physical parameters and the sensing area of the adaptable card reader, the positioning of the target test smart card is adjusted and a second adaptability network layer is formulated.
4. The method according to claim 3, characterized in that The basic technical indicators corresponding to the target test smart card include logic parameters; According to the objectives, the operating system version built into the smart card is tested, and the test environment and command set are determined; Based on the physical parameters, the test environment and the command set, in combination with the first adaptive network layer and the second adaptive network layer, a test execution framework is constructed.
5. The method of claim 2, wherein the key performance indicators during each test are extracted, characterized in that: The method comprises: Collect multi-dimensional performance data during each test; According to the performance fluctuation trend, formulate a performance fluctuation baseline; Based on the multi-dimensional performance data, the key performance indicators are determined by comparing with the performance fluctuation baseline.
6. The method according to claim 5, characterized in that Based on the multi-dimensional performance data, the key performance indicator is determined by comparing it with the performance fluctuation baseline, and the method includes: Adding a dynamic threshold interval based on the performance fluctuation trend; Based on the multi-dimensional performance data, according to the dynamic threshold interval, a deviation analysis is performed to calculate the degree of deviation; The key performance indicator is determined according to the degree of deviation.
7. The method according to claim 4, characterized in that Based on the physical parameters, the test environment and the command set, in combination with the first adaptive network layer and the second adaptive network layer, a test execution framework is constructed, and the method further includes: Introducing custom testing requirements; Based on the physical parameters, the test environment and the command set, and according to the custom test requirements, a custom test scenario and a custom command set are configured. Based on the custom test scenario and the custom command set, a plug-in architecture is adopted to integrate with the test execution framework.
8. The method according to claim 7, characterized in that Using a plug-in architecture and integrated with the test execution framework, the method further includes: Obtaining security characteristic indicators associated with the target test smart card; Based on the security feature indicators, after the custom test plug-in is integrated, the security vulnerability scanning parameters are updated, and the security vulnerability scanning parameters include scanning range, scanning depth, and scanning speed.
9. An automated testing platform for smart cards, characterized in that: The system is used to execute the automated testing method for a smart card according to any one of claims 1 to 8, comprising: The index extraction module is used to parse the engineering files in the automated test library and extract the basic technical indicators corresponding to the target test smart card, wherein the basic technical indicators include data transmission rate, encoding mode, physical parameters, and logical parameters; An adaptation module, used to determine an adaptation test tool and an adaptation card reader based on the engineering file and the basic technical indicators; The marking module is used to parse the test script through regular expressions and mark the available test cases; A parameter configuration module is used to configure the test parameters in the available test cases according to the adaptation test tool and the adaptation card reader after receiving the test confirmation instruction issued by the user end, and send the test task to the test engine; The test module is used for the test engine to automatically execute the test, and generate a test report after the test is completed. The test report includes the test results.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automated testing method for a smart card as claimed in any one of claims 1 to 8 are implemented.