CN112098924B - Interactive function testing method and device based on double-core intelligent electric meter - Google Patents

Interactive function testing method and device based on double-core intelligent electric meter Download PDF

Info

Publication number
CN112098924B
CN112098924B CN202011213845.0A CN202011213845A CN112098924B CN 112098924 B CN112098924 B CN 112098924B CN 202011213845 A CN202011213845 A CN 202011213845A CN 112098924 B CN112098924 B CN 112098924B
Authority
CN
China
Prior art keywords
test
tested
code
instruction
data
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.)
Active
Application number
CN202011213845.0A
Other languages
Chinese (zh)
Other versions
CN112098924A (en
Inventor
谢文旺
周尚礼
张本松
吴昊文
张乐平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202011213845.0A priority Critical patent/CN112098924B/en
Publication of CN112098924A publication Critical patent/CN112098924A/en
Application granted granted Critical
Publication of CN112098924B publication Critical patent/CN112098924B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass
    • G01R35/04Testing or calibrating of apparatus covered by the other groups of this subclass of instruments for measuring time integral of power or current

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The application relates to an interactive function testing method and device based on a double-core intelligent electric meter, computer equipment and a storage medium. The method comprises the steps of determining a plurality of test items corresponding to the interactive function by acquiring a code for realizing the interactive function in the intelligent electric meter, wherein the test items comprise a basic function test, a data push test and a special environment and pressure test based on a code to be tested, testing the code to be tested respectively aiming at each test item to obtain a corresponding test result, and generating a test report corresponding to the code to be tested according to the test result. Compared with the traditional test method for the intelligent electric meter, the scheme is suitable for the software and hardware structure of the new-generation intelligent electric meter by designing the test items aiming at the interactive function in the new-generation intelligent electric meter, and the test of the double-core interactive function of the new-generation intelligent electric meter is realized.

Description

Interactive function testing method and device based on double-core intelligent electric meter
Technical Field
The application relates to the technical field of function testing, in particular to an interactive function testing method and device based on a double-core intelligent electric meter, computer equipment and a storage medium.
Background
In recent years, with the continuous development of energy internet and the continuous deepening of electric power market reformation, a new service scene emerging in a new period puts higher requirements on interactivity, high efficiency, safety and the like of the intelligent electric meter. Meanwhile, as a formal member country of the international legal metering Organization (OIML), in order to meet new requirements of the IR46 on metering, control, performance and the like of the smart meter, separation of the management core and the metering core becomes a clear development direction of a new generation of smart meters.
At present, the two-core interaction function, which is an important function of a basic application layer in the two-core smart meter, is usually packaged in the basic application of the two-core smart meter, or independently exists in a software architecture of a management core in a form of middle-layer metering management service in an embedded operating system of the smart meter. No matter which type, the measurement core and the management core of the new generation of intelligent electric meter have all realized the separation of two cores, and the mode with SPI and UART interface between two cores realizes communicating, and the mutual function of two cores also becomes a core function that influences the stability of the operating system of the new generation of intelligent electric meter, and consequently testing the mutual function in the two cores intelligent electric meter is the important measure of guaranteeing intelligent electric meter normal operating. However, the traditional smart electric meter does not realize the dual-core separation, so that the dual-core interaction function does not exist, and the test of the dual-core interaction function does not exist.
Therefore, comprehensive testing of the interaction function of the new generation of dual-core smart meters has become an urgent problem to be solved.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, a computer device and a storage medium for testing an interaction function of a two-core smart meter, which can test the interaction function of the two-core smart meter.
An interactive function testing method based on a double-core smart electric meter comprises the following steps:
acquiring a code to be tested; the code to be tested comprises a code used for realizing an interactive function in the intelligent ammeter;
determining a plurality of test items corresponding to the interactive function, and testing the codes to be tested respectively aiming at each test item to obtain corresponding test results; the plurality of test items comprise a basic function test based on a code to be tested, a data push test and a special environment and pressure test, wherein the basic function test based on the code to be tested comprises a test on a basic function of the code to be tested, the data push test comprises a test on a push function of the code to be tested, and the special environment and pressure test comprises a test on exception handling of the code to be tested;
and generating a test report corresponding to the code to be tested according to the test result.
In one embodiment, the performing of the basic function test based on the code to be tested includes one or more of the following:
carrying out a power-on handshake test on the code to be tested to obtain a test result of the power-on handshake test; the power-on handshake test comprises the steps of testing whether the code to be tested can correctly display the address of the modified metering core in the intelligent electric meter and whether the instantaneous quantity data sent by the metering core can be correctly received;
performing a key refreshing test on the code to be tested to obtain a test result of the key refreshing test; the key refreshing test comprises testing whether the code to be tested can correctly respond and displaying a case refreshing display request of the metering core;
performing synchronous data test on the code to be tested to obtain a test result of the synchronous data test; the synchronous data test comprises the step of testing whether the code to be tested can send a preset data frame to the metering core at a preset time and whether the response frame returned by the metering core for the preset data frame can be correctly analyzed;
performing peripheral control test on the code to be tested to obtain a test result of the peripheral control test; the peripheral control test comprises the steps of testing whether the code to be tested can correctly push a preset peripheral control instruction to the metering core and whether the response frame returned by the metering core for the peripheral control instruction can be correctly analyzed;
carrying out real-time status symbol flicker frequency test on the code to be tested to obtain a test result of the real-time status symbol flicker frequency test; the real-time state symbol flashing frequency test comprises the steps of testing whether the code to be tested can push a state symbol setting instruction comprising preset flashing frequency to the metering core or not and whether a response frame returned by the metering core aiming at the state symbol setting instruction can be correctly analyzed or not;
carrying out measurement simulation unit data access test on the code to be tested to obtain a test result of the measurement simulation unit data access test; the measurement simulation unit data access test comprises the step of testing whether the code to be tested can transparently forward an access instruction to a measurement simulation unit in the intelligent electric meter and whether a response frame returned by the measurement simulation unit aiming at the access instruction can be correctly analyzed;
the method further comprises the following steps:
and obtaining a test result of the basic function test based on the code to be tested according to one or more of a test result of the power-on handshake test, a test result of the key refreshing test, a test result of the synchronous data test, a test result of the peripheral control test, a test result of the real-time state symbol flashing frequency test and a test result of the metering simulation unit data access test.
In one embodiment, the performing a data access test on the metering simulation unit on the code to be tested to obtain a test result of the data access test on the metering simulation unit includes:
acquiring a plurality of access instructions aiming at a metering simulation unit in the intelligent electric meter; the plurality of access instructions comprise at least two of a reading instruction, a time setting instruction, a date setting instruction, a broadcast timing instruction, a multifunctional terminal switching instruction and a zero clearing instruction;
through the code to be tested, the multiple access instructions are sent to the metering simulation unit in a traversing mode, and the output result of the code to be tested aiming at the multiple access instructions is obtained; the metering simulation unit is used for returning a corresponding response frame to the code to be tested according to the type of the access instruction after receiving the access instructions;
and acquiring an analysis result of the code to be tested on the response frame, and acquiring a test result of the data access test of the metering simulation unit according to the output result and the analysis result.
In one embodiment, the performing data push test on the code to be tested includes one or more of the following:
carrying out an instantaneous quantity and frozen data push test on the code to be tested to obtain a test result of the instantaneous quantity and frozen data push test; the pushing test of the instantaneous quantity and the frozen data comprises the steps of testing whether the code to be tested can be correctly analyzed and executing an instantaneous quantity synchronization instruction and a frozen data synchronization instruction which are sent by an upper computer and aim at the intelligent electric meter and whether a response frame can be returned according to the instantaneous quantity synchronization instruction and the frozen data synchronization instruction;
carrying out measurement core clock data push test on the code to be tested to obtain a test result of the measurement core clock data push test; the measurement core clock data push test comprises the steps of testing whether the code to be tested can be analyzed and executing a preset clock data synchronization instruction which is sent by an upper computer and aims at the intelligent electric meter;
carrying out broadcast timing data push test on the code to be tested to obtain a test result of the broadcast timing data push test; the broadcast timing data pushing test comprises the steps of judging whether the code to be tested can be analyzed and sending a preset broadcast timing instruction pushed by a metering simulation unit to a management core in the intelligent ammeter so as to enable the time of the metering core to be consistent with that of the management core for testing;
carrying out error self-monitoring data push test on the code to be tested to obtain a test result of the error self-monitoring data push test; the error self-monitoring data push test comprises the steps of analyzing whether the code to be tested analyzes an interval setting instruction sent by an upper computer or not and obtaining time scale data sent by the metering core according to a preset time interval corresponding to the interval setting instruction to test;
the method further comprises the following steps:
and obtaining the test result of the data push test according to one or more of the test result of the instantaneous quantity and frozen data push test, the test result of the metering core clock data push test, the test result of the broadcast timing data push test and the test result of the error self-monitoring data push test.
In one embodiment, the special environment and stress test on the code to be tested includes one or more of the following:
carrying out measurement simulation unit exception request test on the code to be tested to obtain a test result of the measurement simulation unit exception request test; the measurement simulation unit exception request test comprises the step of testing whether the code to be tested can analyze a preset exception data instruction sent by an upper computer and whether the execution of the preset exception data instruction can be stopped;
performing display test on the code to be tested to obtain a test result of the display test; the display test comprises the steps that whether the code to be tested can transmit preset data to a display screen of the intelligent ammeter according to a trigger instruction with a preset frequency and a push instruction with the preset frequency or not so that the display screen can display the preset data for testing;
carrying out bidirectional communication pressure test on the code to be tested to obtain a test result of the bidirectional communication pressure test; the bidirectional communication pressure test comprises the steps that when a backlight switch instruction aiming at the display screen can be transmitted according to a preset time interval or not by the code to be tested, after a trigger instruction of a preset frequency is detected, the preset data are transmitted to the display screen, so that the display screen can test the preset data;
the method further comprises the following steps:
and obtaining the test result of the special environment and pressure test according to the test result of the abnormal request test of the metering simulation unit, the test result of the display test and the test result of the bidirectional communication pressure test.
In one embodiment, the performing a display test on the code to be tested to obtain a test result of the display test includes:
acquiring a display instruction aiming at the code to be tested; the display instruction comprises a preset frequency triggering instruction triggered by a preset key in the intelligent electric meter and/or a preset frequency pushing instruction in the intelligent electric meter;
if the display instruction is the trigger instruction of the preset frequency, transmitting the trigger instruction of the metering core in the intelligent ammeter based on the preset frequency to a display screen in the intelligent ammeter through the code to be tested, and generating data according to a preset rule;
if the display instruction is a push instruction with the preset frequency, transmitting the push instruction based on the preset frequency by a metering core in the electric meter to a display screen in the intelligent electric meter through the code to be tested, and generating data according to a preset rule;
and according to the display screen, a test result of the display test is obtained according to the display result of the data based on the trigger instruction of the preset frequency and/or the push instruction of the preset frequency.
In one embodiment, the performing a bidirectional communication stress test on the code to be tested to obtain a test result of the bidirectional communication stress test includes:
acquiring a backlight switching instruction aiming at the display screen; the backlight switch instruction comprises a lighting instruction and a blanking instruction;
transmitting the backlight switching instruction to the display screen through the code to be tested, and acquiring a response result of the display screen to the backlight switching instruction;
acquiring message sending time and response message receiving time of the code to be tested based on the backlight switch instruction, and acquiring interval time according to the message sending time and the response message receiving time;
responding to a trigger instruction of a preset frequency triggered by a preset key in the intelligent electric meter, sending preset data to the display screen according to a preset rule through the code to be tested, and acquiring a display result of the display screen on the preset data;
and obtaining a test result of the bidirectional communication pressure test according to the response result, the interval time and the display result.
An interactive function testing device based on a two-core smart electric meter, the device comprises:
the acquisition module is used for acquiring a code to be tested; the code to be tested comprises a code used for realizing an interactive function in the intelligent ammeter;
the test module is used for determining a plurality of test items corresponding to the interactive functions, and testing the codes to be tested respectively aiming at each test item to obtain corresponding test results; the plurality of test items comprise a basic function test based on a code to be tested, a data push test and a special environment and pressure test, wherein the basic function test based on the code to be tested comprises a test on a basic function of the code to be tested, the data push test comprises a test on a push function of the code to be tested, and the special environment and pressure test comprises a test on exception handling of the code to be tested;
and the generating module is used for generating a test report corresponding to the code to be tested according to the test result.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the interactive function testing method and device based on the double-core intelligent electric meter, the codes used for achieving the interactive function in the intelligent electric meter are obtained, the plurality of test items corresponding to the interactive function are determined, the test items comprise basic function testing, data pushing testing and special environment and pressure testing based on the codes to be tested, the codes to be tested are tested respectively aiming at the test items, corresponding test results are obtained, and test reports corresponding to the codes to be tested are generated according to the test results. Compared with the traditional test method for the intelligent electric meter, the scheme is suitable for the software and hardware structure of the new-generation intelligent electric meter by designing the test items aiming at the interactive function in the new-generation intelligent electric meter, and the test of the double-core interactive function of the new-generation intelligent electric meter is realized.
Drawings
FIG. 1 is a diagram of an application environment of a method for testing an interactive function based on a two-core smart meter according to an embodiment;
FIG. 2 is a schematic flow chart illustrating an interactive function testing method based on a two-core smart meter according to an embodiment;
FIG. 3 is a schematic flow chart illustrating an interactive function testing method based on a two-core smart meter according to another embodiment;
FIG. 4 is a schematic flow chart illustrating an interactive function testing method based on a two-core smart meter according to another embodiment;
FIG. 5 is a block diagram of an interactive function testing device based on a two-core smart meter according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The interactive function testing method based on the double-core intelligent electric meter can be applied to the application environment shown in fig. 1. Among other things, the test equipment 102 may communicate with the management core test module 104, such as over a wired network or over a wireless network. The test device 102 may obtain, from the management core test module 104, a relevant code for implementing an interaction function in the dual-core smart meter, as a code to be tested, and the test device 102 may determine, for the test code, a plurality of test items and perform a corresponding test on the code to be tested for each test item, for example, the test device 102 may send a relevant instruction to the management core test module and receive relevant information and the like returned by the management core test module 104, and the test device 102 may generate a test report corresponding to the code to be tested according to a test result returned by the management core test module 104. The test device 102 may be an upper computer, which may include test software, and has functions of loading and configuring an automated test scheme, and supports functions of user management, parameter setting, automated testing, test data query, test report management, and the like, and the management core test module 104 may be a module composed of a test board, a management core test APP, and the like. Additionally, in one embodiment, a metering core simulation module may be included, which may include a metering core simulation APP, which may communicate with the test equipment 102 and the management core test module 104, and may provide data sources and interaction instructions from the metering core of the two-core smart meter.
In one embodiment, as shown in fig. 2, there is provided an interactive function testing method based on a two-core smart meter, which is described by taking the method as an example for being applied to the testing device in fig. 1, and includes the following steps:
step S202, acquiring a code to be tested; the code to be tested comprises a code used for realizing an interactive function in the intelligent electric meter.
The code to be tested can be a code for realizing an interaction function in the double-core intelligent electric meter, the double-core intelligent electric meter can be a new generation intelligent electric meter, a double-core separation design is adopted, namely a metering core and a management core are separated, and the double-core interaction function can exist in the management core in an integral mode in a mode of sealing which code is used. The testing device 102 may obtain a code for implementing an interactive function in the smart meter as a code to be tested. Specifically, the test device 102 may obtain the relevant code for implementing the interactive function through header file analysis and function positioning on the basis of obtaining the whole code of the to-be-intelligent electric meter. The code to be tested can be obtained from the management core testing module 104, or can be directly obtained from the dual-core smart meter.
Step S204, determining a plurality of test items corresponding to the interactive function, and testing the code to be tested respectively aiming at each test item to obtain a corresponding test result; the plurality of test items comprise basic function tests, data pushing tests and special environment and pressure tests based on the codes to be tested, the basic function tests based on the codes to be tested comprise tests on basic functions of the codes to be tested, the data pushing tests comprise tests on pushing functions of the codes to be tested, and the special environment and pressure tests comprise tests on exception handling of the codes to be tested.
The test item may be a test item corresponding to an interactive function in the two-core smart meter, and the test device 102 may determine a plurality of test items corresponding to the interactive function, so that the codes to be tested may be tested for each test item, and a corresponding test result may be obtained. The test items may include a plurality of test items, for example, a basic function test based on a code to be tested, a data push test, a special environment and pressure test, and the like, where the basic function test based on the code to be tested may include a test of a basic function of the code to be tested that implements an interactive function in the two-core smart meter, the data push test may include a test of a push function of the code to be tested, and the special environment and pressure test may include a test of an exception handling capability of the code to be tested. Each test item may further include a plurality of test steps, each test item may have a corresponding test result, for example, the test device 102 performs a basic function test based on a code to be tested on the code to be tested, may obtain a first test result, the test device 102 performs a data push test on the code to be tested, may obtain a second test result, the test device 102 performs a special environment and pressure test on the code to be tested, may obtain a third test result, and the test device 102 may further obtain a test result corresponding to the code to be tested according to each test result, for example, according to the first test result, the second test result, and the third test result.
It should be noted that the test items determined by the test device 102 and related to the interactive function may not be limited to the basic function test, the data push test, and the special environment and pressure test based on the code to be tested, the test device 102 may also determine other test items, and the test items corresponding to different interactive functions may be different, and the test items corresponding to the same interactive function of different types/types of electric meters may also be different, so that it is necessary to determine which test items correspond specifically according to the type/type of the electric meter and the interactive function.
And step S206, generating a test report corresponding to the code to be tested according to the test result.
The test result may be a test result corresponding to the code to be tested, which is obtained by the test device 102 according to the test result corresponding to each test item, and the test device 102 may generate a test report corresponding to the code to be tested according to the test result. Specifically, when the test items are a basic function test, a data push test and a special environment and pressure test based on the code to be tested, the test equipment 102 may output a test report of the dual-core interaction function of the smart meter after comprehensive analysis according to test results of each test item designed in the basic function test, the data push test and the special environment and pressure test based on the code to be tested, and the test report may be output through a display screen in the test equipment 102.
According to the interactive function testing method based on the double-core intelligent ammeter, a plurality of testing items corresponding to the interactive function are determined by obtaining the codes used for realizing the interactive function in the intelligent ammeter, the testing items comprise basic function testing, data pushing testing and special environment and pressure testing based on the codes to be tested, the codes to be tested are respectively tested aiming at each testing item, corresponding testing results are obtained, and testing reports corresponding to the codes to be tested are generated according to the testing results. Compared with the traditional test method for the intelligent electric meter, the scheme is suitable for the software and hardware structure of the new-generation intelligent electric meter by designing the test items aiming at the interactive function in the new-generation intelligent electric meter, and the test of the double-core interactive function of the new-generation intelligent electric meter is realized.
In one embodiment, the basic function test based on the code to be tested is performed on the code to be tested, and comprises one or more of the following items: carrying out power-on handshake test on the code to be tested to obtain a test result of the power-on handshake test; the power-on handshake test comprises the steps of testing whether the code to be tested can correctly display the address of the modified metering core in the intelligent electric meter and whether the instantaneous quantity data sent by the metering core can be correctly received; performing a key refreshing test on the code to be tested to obtain a test result of the key refreshing test; the key refreshing test comprises the step of testing whether the code to be tested can correctly respond and display the case refreshing display request of the metering core; carrying out synchronous data test on the code to be tested to obtain a test result of the synchronous data test; the synchronous data test comprises the steps of testing whether the code to be tested can send a preset data frame to the metering core at preset time and whether the response frame returned by the metering core for the preset data frame can be correctly analyzed; performing peripheral control test on the code to be tested to obtain a test result of the peripheral control test; the peripheral control test comprises the steps of testing whether the code to be tested can correctly push a preset peripheral control instruction to the metering core and whether the response frame returned by the metering core aiming at the peripheral control instruction can be correctly analyzed; carrying out real-time status symbol flicker frequency test on the code to be tested to obtain a test result of the real-time status symbol flicker frequency test; the real-time state symbol flicker frequency test comprises the steps of testing whether a code to be tested can push a state symbol setting instruction comprising preset flicker frequency to the metering core or not and whether a response frame returned by the metering core according to the state symbol setting instruction can be correctly analyzed or not; carrying out measurement simulation unit data access test on the code to be tested to obtain a test result of the measurement simulation unit data access test; the measurement simulation unit data access test comprises the steps of testing whether the code to be tested can transparently forward the access instruction to the measurement simulation unit in the intelligent ammeter and whether the response frame returned by the measurement simulation unit aiming at the access instruction can be correctly analyzed; further comprising: and obtaining a test result of the basic function test based on the code to be tested according to one or more items of a test result of the power-on handshake test, a test result of the key refreshing test, a test result of the synchronous data test, a test result of the peripheral control test, a test result of the real-time state symbol flashing frequency test and a test result of the data access test of the metering simulation unit.
In this embodiment, the test item of the test device 102 for the code to be tested may include a basic function test based on the code to be tested, the basic function test based on the code to be tested may be a test on whether the code to be tested can normally realize the basic function of the interaction function in the two-core smart meter, and may include at least one of a power-on handshake function test, a key refresh function test, a synchronous rate function test, a peripheral control function test, a real-time state symbol flashing frequency test, and a metering simulation unit data access test, for example, the test device 102 may perform at least one of the above tests on the code to be tested, and obtain a test result corresponding to the test. The power-on handshake test can be used for testing whether the code to be tested can correctly display the address of the modified metering core in the intelligent electric meter and whether the instantaneous quantity data sent by the metering core can be correctly received; the key refreshing test can be a test on whether the code to be tested can correctly transmit the button refreshing display request of the metering core; the synchronous data test can be to test whether the code to be tested can correctly transmit the preset data frame to the metering core in the double-core intelligent ammeter and whether the response frame returned by the metering core aiming at the preset data frame can be correctly analyzed; the peripheral control test can be to test whether the code to be tested can correctly push a preset peripheral control instruction to the metering core and whether the metering core can correctly analyze a response frame returned by the metering core for the peripheral control instruction; the real-time status symbol flashing frequency test can be to test whether the code to be tested can push a status symbol setting instruction including a preset flashing frequency to the metering core and whether the metering core can correctly analyze a response frame returned by the status symbol setting instruction; the measurement simulation unit data access test can be to determine whether the code to be tested can transparently forward the access instruction to the measurement simulation unit in the smart meter, and whether the response frame returned by the measurement simulation unit to the access instruction can be correctly analyzed.
Specifically, the testing device 102 may perform a power-on handshake test on the code to be tested to obtain a test result of the power-on handshake test, where the test steps may be as follows:
(1) writing codes to be tested, namely the obtained codes related to the double-core interactive function and the test programs, in a test board (a core board of the same type as the management core can be used) in the management core test module 104;
(2) the test equipment 102 controls the start of the metering core simulation module and modifies its table address to a predetermined address, e.g., 181818181818, wherein the predetermined address is modifiable, its clock data is modified to a certain time x, wherein the time is modifiable;
(3) the test equipment 102 controls the test program to start the electrifying process of the double-core interaction function related program simulation ammeter;
(4) after waiting for a preset time, for example, 5s, the preset time may be set according to an actual situation, and the test device 102 controls the test program to print the RTC time and the table address data acquired by the dual-core interaction module, so as to obtain a test result of the power-on first handshake function;
(5) the test equipment 102 controls the metering core simulation module to perform one-time instantaneous quantity updating operation;
(6) after waiting for a preset time, for example, 5 seconds, the preset time may be set according to an actual situation, the testing device 102 controls the testing program to print an instantaneous quantity obtained by the code to be tested, and simultaneously monitors and analyzes a response frame of the code to be tested, so as to obtain a testing result of the second handshake function;
(7) the test device 102 comprehensively analyzes the test results of the step 4 and the step 6, and outputs the test result of the power-on handshake function of the code to be tested.
Wherein the test result of the power-on handshake test may be determined to be successful when the test device 102 detects the following result:
(1) in the first handshake test, the table address printed on the shell interface is the table address (181818181818) after the metering core is modified, and the printed clock data is consistent with the time after the metering core is modified;
(2) in the second handshake test, the instantaneous quantity obtained by analyzing the code to be tested is consistent with the instantaneous quantity of the metering core simulation module, and meanwhile, the response frame responded by the code to be tested is correct.
The test equipment 102 may perform a key refresh test on the code to be tested to obtain a test result of the key refresh test, where the specific steps of the key refresh test may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained code related to the dual-core interactive function and the test program, in the test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 controls the test program to start the double-core interaction function related program;
(3) the test equipment 102 controls to start the metering core simulation module and controls the metering core simulation APP to generate a key refreshing display request message according to a preset time interval, for example, 500ms, wherein the time interval can be modified;
(4) the program to be tested receives the request message, and responds after analysis;
(5) the test program monitors the output of the program to be tested and prints and outputs the information, and the test equipment 102 acquires the printed information;
(6) the test equipment 102 analyzes the print information in the shell and outputs the test result of the key refreshing function.
When the test device 102 detects the following result, it may be determined that the test result of the key refresh test is successful:
(1) after receiving a key refreshing display request message every time, the code to be tested can make a correct response, and a data identifier corresponding to the key request can be printed in the Shell, namely correct display information can be pushed to the metering core;
(2) after each key is pressed, the display screen of the metering core simulation device can be switched.
The testing device 102 may further perform a synchronous data test on the code to be tested to obtain a test result of the synchronous data test, for example, a synchronous rate test may be performed on the code to be tested, and the test steps of the synchronous data test may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 controls the test program to start the double-core interaction function related program;
(3) the test equipment 102 starts a metering core analog module, and after the power-on handshake is completed, a metering core clock is set to 0 point, 59 minutes and 55 seconds;
(4) the test equipment 102 monitors rate electric quantity data issuing information of the program to be tested after 1 point, 0 minute and 0 second, and analyzes to obtain a test result 1 of the rate synchronization function;
(5) after waiting for a preset time, for example, 5s (which can be set), the test equipment 102 controls the metering core simulation module to send a successful response frame to the program to be tested, and monitors an analysis result of the program to be tested to obtain a test result 2;
(6) the test equipment 102 replaces the response frame in the step 5 with an abnormal response frame, and repeats the steps 1-5 to obtain a test result 3;
(7) the test equipment 102 comprehensively analyzes the test results 1-3 to obtain the test result of the synchronous rate function.
Wherein the test result of the synchronous data test may be determined to be successful when the test device 102 detects the following result:
(1) when the time is 1 point 00 min 00 s, the code to be tested can correctly send rate electric quantity data;
(2) the code to be tested should be able to correctly resolve normal and abnormal response frames from the metrology core.
The test device 102 may further perform a peripheral control test on the code to be tested to obtain a test result of the peripheral control test, where the test steps of the peripheral control test may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 controls the test program to start the double-core interaction function related program;
(3) the test equipment 102 controls the test program to send a liquid crystal viewing instruction message to the program to be tested;
(4) the test equipment 102 monitors the instruction execution condition of the program to be tested, and prints the output instruction information of the program to be tested corresponding to the code to be tested to obtain the test result of the liquid crystal viewing function;
(5) the test equipment 102 replaces the instruction message in the step 3 with the instruction messages such as backlight lighting, remote switching on and off, alarming, power conservation and the like, and repeats the steps 1-4 to obtain a test result corresponding to the test of the peripheral control function;
(6) the test equipment 102 controls the metering core simulation module to respectively send a normal response frame and an abnormal response frame of the peripheral control instruction to the program to be tested, and monitors the analysis condition of the program to be tested on the response frames;
(7) the test equipment 102 comprehensively analyzes the test result of each peripheral control function sub-item and outputs the test result of the peripheral control function.
Wherein the test result of the peripheral control test may be determined to be successful when the test device 102 detects the following result:
when receiving an instruction frame for peripheral control from the test device 102, the code to be tested should push a correct peripheral control command to the metering core; when a response frame from the metering core simulation module is received, the frame analysis of the code to be tested should be correct.
The testing device 102 may further perform a real-time status symbol flashing frequency test on the code to be tested to obtain a test result of the real-time status symbol flashing frequency test, where the test steps of the real-time status symbol flashing frequency test may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 controls the test program to start the double-core interaction function related program;
(3) the test equipment 102 sets the flashing frequency of all the status symbols to a preset frequency, for example, 500ms, which can be modified;
(4) the test equipment 102 acquires the response message in the test program printing result, and judges whether the response message is correct or not to obtain a test result 1;
(5) changing the flicker frequency in the step 3, and repeating the steps 1-4 to obtain a test result 2;
(6) changing the instruction in the step 3 into a traversal test for each state symbol, and repeating the steps 1-5 to obtain a test result 3;
(7) the test equipment 102 controls the metering core simulation module to respectively send normal and abnormal response frames to the code to be tested, and the test equipment 102 monitors the analysis result of the program to be tested to obtain a test result 4;
(8) and comprehensively analyzing the test results in the steps 4-7 to obtain a flicker frequency test result of the real-time status symbol.
Wherein the test result of the real-time status symbol flashing frequency test may be determined to be successful when the test device 102 detects the following result:
(1) according to the content of the real-time state symbol setting instruction, the code to be tested should push a correct setting instruction to the metering core, and a correct response message can be printed on a shell interface;
(2) the code to be tested should be able to correctly resolve the normal and abnormal response frames from the metering simulation unit.
The test device 102 may further perform a measurement simulation unit data access test on the code to be tested to obtain a test result of the measurement simulation unit data access test, where the test may be a test for testing the forwarding performance of the code to be tested by using a plurality of instruction frames. The metering simulation unit can be obtained by simulating the metering unit in the intelligent electric meter through a computer, and can realize the function of the metering unit in the intelligent electric meter.
In addition, the test device 102 may further obtain a test result of the basic function test based on the code to be tested according to the test results of the above test items, for example, one or more of the test result of the power-on handshake test, the test result of the key refresh test, the test result of the synchronous data test, the test result of the peripheral control test, the test result of the real-time status symbol flashing frequency test, and the test result of the data access test of the metering simulation unit.
Through the embodiment, the test equipment 102 can perform a plurality of test items related to the basic function in the interactive function on the code to be tested, so that a test result of the basic function test based on the code to be tested is obtained, and the interactive function test adaptive to the software and hardware structure of the dual-core intelligent electric meter is realized.
In one embodiment, performing a measurement simulation unit data access test on a code to be tested to obtain a test result of the measurement simulation unit data access test includes: acquiring a plurality of access instructions aiming at a metering simulation unit in the intelligent electric meter; the plurality of access instructions comprise at least two of a reading instruction, a time setting instruction, a date setting instruction, a broadcast timing instruction, a multifunctional terminal switching instruction and a zero clearing instruction; traversing and sending a plurality of access instructions to a metering simulation unit through a code to be tested, and acquiring output results of the code to be tested aiming at the plurality of access instructions; the metering simulation unit is used for returning a corresponding response frame to the code to be tested according to the type of the access instruction after receiving the plurality of access instructions; and acquiring an analysis result of the code to be tested on the response frame, and acquiring a test result of the data access test of the metering simulation unit according to the output result and the analysis result.
In this embodiment, the metering simulation unit may be a unit in charge of metering data in the dual-core smart meter, the access instruction may be an instruction for setting and reading a relevant parameter of the metering simulation unit, and may include at least two of a reading instruction, a time setting instruction, a date setting instruction, a broadcast timing instruction, a multi-function terminal switching instruction, and a zero clearing instruction, the test device 102 may send the multiple access instructions to the metering simulation unit by traversing with the code to be tested, to obtain an output result of the code to be tested, and the test device 102 may further obtain an analysis result of the code to be tested on a response frame returned by the metering simulation unit according to the received instruction, so that the test device 102 may obtain a test result of the data access test of the metering simulation unit according to the output result and the analysis result. Specifically, the test steps of the metering simulation unit data access test may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 controls the test program to start the double-core interaction function related program;
(3) the test equipment 102 controls the test program simulation bus service to issue a data frame (such as a metering core instantaneous quantity reading instruction) to a code to be tested;
(4) the test equipment 102 controls the test program analog measurement core to receive an output frame of the program to be tested, and a test result 1 is obtained through analysis;
(5) the test equipment 102 replaces the data frame in the step 3 with the parameter setting instruction, and repeats the steps 1-4 to obtain a test result 2;
(6) according to the method, the test equipment 102 conducts ergodic test on the reading and parameter setting instructions (setting time, date, broadcast timing, multifunctional terminal switching, zero clearing and the like) to obtain a corresponding instruction ergodic test result 3;
(7) the test equipment 102 controls the metering core simulation module to respectively send normal and abnormal response frames to the program to be tested, and the test equipment 102 monitors the analysis result of the program to be tested to obtain a test result 4 of the analysis function of the metering core access instruction response frame;
(8) the test equipment 102 comprehensively analyzes the test results 1-4 and outputs the test results of the data access of the metering simulation unit.
Wherein the test result of the metering simulation unit data access test may be determined to be successful when the test equipment 102 detects the following result:
(1) the code to be tested can transparently forward the access instruction (including reading, setting, broadcasting, time correcting and the like) of the metering simulation unit, and can meet the traversal test requirement of the instruction;
(2) the code to be tested should be able to correctly resolve the normal and abnormal response frames from the metering simulation unit.
By the embodiment, the test equipment 102 can test different access instructions of the metering simulation unit for the code to be tested, so that the test of the interaction function of the software and hardware structure of the double-core intelligent electric meter can be realized.
In one embodiment, the data push test is performed on the code to be tested, and the data push test comprises one or more of the following: carrying out an instantaneous quantity and frozen data push test on the code to be tested to obtain a test result of the instantaneous quantity and frozen data push test; the transient quantity and frozen data push test comprises the steps of judging whether a code to be tested can be correctly analyzed and executing a transient quantity synchronization instruction and a frozen data synchronization instruction which are sent by an upper computer and aim at the intelligent electric meter, and judging whether a response frame can be returned according to the transient quantity synchronization instruction and the frozen data synchronization instruction for testing; carrying out measurement core clock data push test on the code to be tested to obtain a test result of the measurement core clock data push test; the measurement core clock data push test comprises the steps of testing whether a code to be tested can be analyzed and executing a preset clock data synchronization instruction which is sent by an upper computer and aims at the intelligent electric meter; carrying out broadcast timing data push test on the code to be tested to obtain a test result of the broadcast timing data push test; the broadcast timing data push test comprises the steps of judging whether a code to be tested can be analyzed and sending a preset broadcast timing instruction pushed by a metering simulation unit to a management core in the intelligent ammeter so as to enable the time of the metering core to be consistent with that of the management core to be tested; carrying out error self-monitoring data push test on the code to be tested to obtain a test result of the error self-monitoring data push test; the error self-monitoring data push test comprises the steps of analyzing whether a code to be tested analyzes an interval setting instruction sent by an upper computer or not and obtaining time scale data sent by a metering core according to a preset time interval corresponding to the interval setting instruction to test; further comprising: and obtaining the test result of the data push test according to one or more of the test result of the instantaneous quantity and frozen data push test, the test result of the measurement core clock data push test, the test result of the broadcast timing data push test and the test result of the error self-monitoring data push test.
In this embodiment, the test device 102 may perform a data pushing test on the code to be tested, that is, test whether the code to be tested can correctly transmit the measurement core data, where the test may include one or more of an instantaneous quantity and frozen data pushing test, a measurement core clock data pushing test, a broadcast timing data pushing test, and an error self-monitoring data pushing test.
Specifically, the test device 102 may perform an instantaneous quantity and frozen data push test on the code to be tested, to obtain a test result of the instantaneous quantity and frozen data push test, where the test steps may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 controls the test program to start the double-core interaction function related program;
(3) after the power-on handshake is completed, the test equipment 102 controls the metering core analog module to push an instantaneous quantity data instruction to the code to be tested according to the frequency of 1 time per second, and the test lasts for 10 minutes (can be modified);
(4) the code to be tested receives the instruction, analyzes and executes the instruction, and pushes a response frame to the metering core simulation module;
(5) the test equipment 102 monitors and acquires an instruction frame analysis result of a code to be tested, and analyzes the correctness of response frame framing sent by the instruction to be tested to obtain a test result of the transient pushing function;
(6) modifying the control instruction of the test equipment 102 in the step 3 into a control instruction that the test equipment 102 controls the metering core simulation module to push a frozen data synchronization command to the code to be tested according to the frequency of 1 time per minute, repeating the steps 1-4, and continuously testing for 30 minutes (modifying);
(7) the test equipment 102 monitors the instruction frame analysis result of the program to be tested, and simultaneously analyzes the correctness of the response frame framing sent by the instruction to be tested to obtain the test result of the frozen data pushing function;
the test result of the transient and frozen data push test may be determined to be successful when the test device 102 detects the following:
(1) the code to be tested can correctly analyze and execute the instantaneous quantity synchronous instruction per second and the frozen data synchronous instruction per minute;
(2) after receiving the data push instruction from the metering core simulation module, the code to be tested should correctly organize and issue the response frame according to the requirement of the protocol corresponding to the electric meter, for example, the requirement of the 645 protocol.
The test equipment 102 may also test the push of the measurement core clock data to obtain a test result of the push test of the measurement core clock data. The test steps for the push of the clock data of the metering core may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 starts a metering core simulation module and sets the clock time to a certain time;
(3) the test equipment 102 controls the test program to start the double-core interaction function related program;
(4) after the power-on handshake is completed, the test equipment 102 makes the measurement core simulation module send a clock synchronization instruction to the program to be tested at 30 th second every minute, and the test lasts for 5 minutes (can be modified);
(5) the test equipment 102 monitors the output of the program to be tested and prints and outputs clock information acquired from the program to be tested according to the frequency of 1 time per minute;
(6) the test equipment 102 comprehensively analyzes the monitoring result and the printing information, and outputs a test result of the clock data push test of the metering core.
When the test equipment 102 detects that the test result of the above-mentioned push test of the clock data of the measurement core is as follows, it can be determined that the test result is successful:
the code to be tested should be able to analyze and execute the clock data synchronous instruction of 30 th second per minute, the program to be tested should analyze the instruction correctly, and the printing of the test program to the clock time should be consistent with the clock data of the metering core.
The test device 102 may further perform a broadcast timing data push test on the code to be tested to obtain a test result of the broadcast timing data push test. The specific test steps can be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 starts a metering core simulation module;
(3) the test equipment 102 controls the test program to start the double-core interaction function related program;
(4) after the power-on handshake is completed, the test equipment 102 changes the management core time to a certain random time;
(5) the test device 102 controls the change time of the metering core simulation module to be 59 minutes and 55 seconds at the 0 point of the day;
(6) after waiting for 1 point 00 min 00 s, the test equipment 102 prints the management core clock time obtained from the program to be tested, and compares whether the management core clock time is consistent with the time of the metering core simulation module;
(7) the test device 102 comprehensively analyzes the test results to obtain the test results of the broadcast timing data push test.
When the test device 102 detects that the result is as follows, it may be determined that the test result of the broadcast timing data push test is successful:
the code to be tested should be capable of correctly analyzing the broadcast timing command pushed by the metering simulation unit and sending the broadcast timing command to the management core, namely, the time read from the management core after the broadcast timing is consistent with the time of the metering core.
The test device 102 may further perform an error self-monitoring data push test on the code to be tested to obtain a test result of the error self-monitoring data push test. Specifically, the testing procedure can be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 starts a metering core simulation module;
(3) the test equipment 102 controls the test program to start the double-core interaction function related program;
(4) after the electrification handshake is completed, the upper computer sets the error self-monitoring real-time data acquisition interval of the metering core simulation module to be x minutes (x is set within the range of 3-60);
(5) the test equipment 102 controls the test program to acquire data, print DI and print a data time mark;
(6) the test device 102 obtains a test result from the test program and the print information, and analyzes the test result to obtain a test result of the error self-monitoring data pushing function.
When the test device 102 detects a result, it may be determined that the test result of the error self-monitoring data pushing function is successful:
the test equipment 102 can detect that the data time scale of the error self-monitoring data changes in the debugging shell interface, and the difference between the adjacent data time scales is 60x seconds.
In addition, the test device 102 may further obtain a test result of the data pushing test according to one or more of a test result of the above-mentioned instantaneous quantity and frozen data pushing test, a test result of the measurement core clock data pushing test, a test result of the broadcast timing data pushing test, and a test result of the error self-monitoring data pushing test.
By the embodiment, the test equipment 102 can perform tests including an instantaneous quantity and frozen data push test, a measurement core clock data push test, a broadcast timing data push test and an error self-monitoring data push test on the code to be tested, so that an interactive function test suitable for software and hardware structures of the dual-core intelligent electric meter is realized.
In one embodiment, the code under test is subjected to special environmental and stress tests, including one or more of: carrying out measurement simulation unit exception request test on the code to be tested to obtain a test result of the measurement simulation unit exception request test; the measurement simulation unit exception request test comprises the steps of testing whether a code to be tested can analyze a preset exception data instruction sent by an upper computer and whether the execution of the preset exception data instruction can be stopped; carrying out display test on the code to be tested to obtain a test result of the display test; the display test comprises the steps that whether the code to be tested can transmit preset data to a display screen of the intelligent ammeter according to a trigger instruction with a preset frequency and a push instruction with the preset frequency or not so that the display screen can display the preset data to test; carrying out bidirectional communication pressure test on the code to be tested to obtain a test result of the bidirectional communication pressure test; the bidirectional communication pressure test comprises the steps that when a code to be tested can transmit a backlight switch instruction aiming at a display screen according to a preset time interval, after a trigger instruction of a preset frequency is detected, preset data are transmitted to the display screen, so that the display screen displays the preset data to be tested; further comprising: and obtaining the test result of the special environment and pressure test according to the test result of the abnormal request test of the metering simulation unit, the test result of the display test and the test result of the bidirectional communication pressure test.
In this embodiment, the testing device 102 may perform a special environment and pressure test on the code to be tested, where the test may be to test the code to be tested, that is, the interactive function in the smart meter, the processing capability in the case of an abnormal condition, and whether the code to be tested corresponding to the interactive function can be normally transmitted in a pressure environment, for example, when multiple data are transmitted simultaneously. The special environment and stress test may include one or more of a metering simulation unit exception request test, a display test, and a two-way communication stress test, wherein the display test may include a fast refresh display request test and a fast display push test. Specifically, the test device 102 may perform a measurement simulation unit exception request test on the code to be tested to obtain a test result of the measurement simulation unit exception request test, where the specific test steps may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 starts a metering core simulation module;
(3) the test equipment 102 controls the test program to start the double-core interaction function related program;
(4) after the power-on handshake is completed, the test equipment 102 issues a measurement core data reading instruction (for example, an instruction with a wrong frame header) with a wrong configuration to the program to be tested;
(5) the test equipment 102 monitors the analysis and issuing condition of the program to be tested on the error frame to obtain a test result 1;
(6) changing a frame error form, repeating the steps 1-5, and performing ergodic test on error forms such as a frame header, a frame address, a control code, a frame length, a data field, a check code, an end code and the like to obtain a test result 2;
(7) replacing the data reading instruction in the step 4 with other instruction forms, such as a setting instruction, a multifunctional terminal switching instruction, a zero clearing instruction and the like, performing ergodic test on the instruction forms, and repeating the steps 1-6 to obtain a test result 3;
(8) the test equipment 102 comprehensively analyzes the test results 1-3 and outputs the test results of the abnormal request of the metering simulation unit.
The test result of the metrology simulation unit exception request test may be determined to be successful when the test equipment 102 detects the following: when an abnormal data instruction is received, the code to be tested corresponding to the double-core interaction module can be correctly analyzed, but the instruction frame content is not executed and issued.
The test equipment 102 may also perform a display test and a bidirectional communication pressure test on the code to be tested, where the display test may include a fast refresh display request test and a fast display push test, that is, whether the code to be tested can correctly push corresponding data according to the key and the push instruction is tested; the two-way communication stress test may be a test of whether the code under test is capable of multi-threaded transmission of data. In addition, the test device 102 may further obtain a test result of the special environment and pressure test of the code to be tested according to one or more of the above measurement simulation unit exception request test, the fast refresh display request test, the fast display push test, and the bidirectional communication pressure test.
Through the embodiment, the test equipment 102 can perform tests including a measurement simulation unit exception request test, a fast refresh display request test, a fast display push test and a two-way communication pressure test on the code to be tested, so that the code to be tested can be subjected to a special environment and pressure test, and an interactive function test suitable for software and hardware structures of the dual-core intelligent electric meter is realized.
In one embodiment, performing a display test on a code to be tested to obtain a test result of the display test includes: acquiring a display instruction aiming at a code to be tested; the display instruction comprises a trigger instruction of preset frequency triggered by a preset key in the intelligent electric meter and/or a push instruction of the preset frequency in the intelligent electric meter; if the display instruction is the trigger instruction of the preset frequency, transmitting the trigger instruction of a metering core in the intelligent ammeter based on the preset frequency to a display screen in the intelligent ammeter through a code to be tested, and generating data according to a preset rule; if the display instruction is a push instruction with a preset frequency, transmitting the push instruction based on the preset frequency by a metering core in the electric meter to a display screen in the intelligent electric meter through a code to be tested, and generating data according to a preset rule; and according to the display screen, a test result of the display test is obtained according to the display result of the data based on the trigger instruction of the preset frequency and/or the push instruction of the preset frequency.
In this embodiment, the test device 102 may perform display tests on the code to be tested, including a fast refresh display request test and a fast display push test, where the fast refresh display request test may be a test using a preset frequency of trigger instructions triggered by a preset key in the smart meter, and the fast display push test may be a test using a preset frequency of push instructions. The trigger instruction of the preset frequency can be a key request, the push instruction of the preset frequency can be a push request, and the smart electric meter can further comprise a display screen. Specifically, the step of the test device 102 performing the display test on the code to be tested may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 starts a metering core simulation module;
(3) the test equipment 102 controls the test program to start the double-core interaction function related program;
(4) the test equipment 102 sets a test program to print after receiving a key request, and controls 10 '8's of the metering core simulation module to output 0-9 in turn;
(5) the electricity meter key is rapidly triggered for about 20 times (can be modified) (or can be rapidly replaced by 20 times of left and right key requests through controlling a metering core simulation module);
(6) the test equipment 102 acquires the number of messages counted and printed by the test program;
(7) the test equipment 102 acquires the number of printed messages and simultaneously acquires the display result of a display screen of a metering core simulation module;
(8) and comprehensively analyzing the results and outputting the test result of the quick refresh display request.
(9) Repeating the steps 1-3, designing a test program into 10 pieces of 8 display push data which are actively output in turn to be 0-9, outputting one push data per second on average, and constructing a data interval which is shortest 300ms (capable of being modified);
(10) the test equipment 102 acquires the display result of the display screen, comprehensively analyzes and outputs the test result which is rapidly displayed and pushed.
The test result of the display test may be determined to be successful when the test device 102 detects: (1) the number of the received and printed messages is consistent with the number of times of pressing keys; (2) in two kinds of test items, the display screen of measurement core analog module all exports 0~9 in proper order.
By the embodiment, the test equipment 102 can perform the display test based on the key request and the push instruction on the code to be tested, so that the test of the interaction function of the software and hardware structure of the double-core intelligent electric meter is realized.
In one embodiment, performing a bidirectional communication stress test on a code to be tested to obtain a test result of the bidirectional communication stress test includes: acquiring a backlight switching instruction aiming at a display screen; the backlight switch instruction comprises a lighting instruction and a blanking instruction; transmitting a backlight switching instruction to a display screen through a code to be tested, and acquiring a response result of the display screen to the backlight switching instruction; acquiring message sending time and response message receiving time of the code to be tested based on the backlight switch instruction, and acquiring interval time according to the message sending time and the response message receiving time; responding to a trigger instruction based on a preset frequency triggered by a preset key in the intelligent electric meter, sending preset data to a display screen through a code to be tested according to a preset rule, and obtaining a display result of the display screen on the preset data; and obtaining a test result of the bidirectional communication pressure test according to the response result, the interval time and the display result.
In this embodiment, the backlight switch instruction may be an instruction for controlling a backlight switch of a display screen in the smart meter, the message may be a message based on an optical switch instruction, the preset key may be a key in the smart meter, and the preset key may transmit corresponding data to the display screen according to a certain sequence after being triggered, so that the display screen displays the data. The test device 102 may perform the above-mentioned two-way communication pressure test on the code to be tested, so as to obtain a test result of the two-way communication pressure test. Specifically, the test procedure of the two-way communication pressure test may be as follows:
(1) the test device 102 writes a code to be tested, namely the obtained double-core interactive function related code and the test program, in a test board (a core board of the same type as the management core can be used);
(2) the test equipment 102 starts a metering core simulation module;
(3) the test equipment 102 controls the test program to start the double-core interaction function related program;
(4) the test equipment 102 controls a test program to turn on and off the backlight at intervals of 500ms, records the time for sending the message and receiving the response message, and calculates and outputs the interval time;
(5) after receiving the key request, the test program in the test equipment 102 returns to the 0 th 8 th display data which is output to be 0-9 in turn;
(6) the test equipment 102 triggers the key request for 10 seconds at a frequency of three times per second;
(7) the test equipment 102 acquires the interval time from sending backlight control to receiving a response message, which is printed and recorded by the test program;
(8) the test equipment 102 obtains the display backlight state change and the 0 th '8' change of the display screen, and comprehensively analyzes and outputs the two-way communication pressure test result.
The test result of the two-way communication pressure test may be determined to be successful when the test device detects: (1) the backlight is sequentially and alternately turned on and off; (2) the interval time from sending to receiving the message is in accordance with expectation (less than 300 ms); (3) the display screen outputs 0-9 in sequence without jump.
By the embodiment, the test equipment 102 can test the code to be tested based on the backlight switch control instruction and the digital display request, so that the test of the interaction function of the software and hardware structure of the double-core intelligent electric meter is realized.
In one embodiment, as shown in fig. 3, fig. 3 is a schematic flowchart of an interactive function testing method based on a two-core smart meter in another embodiment. In this embodiment, the testing device 102 may obtain a code to be tested related to the implementation of the dual-core interaction function in the smart meter, perform a first test on the code to be tested to obtain a first test result, perform a second test on the code to be tested to obtain a second test result, and may further perform a third test on the code to be tested to obtain a third test result; and finally, outputting a test report of the double-core interaction function of the intelligent electric meter according to the first test result, the second test result and the third test result.
Specific contents of the first test, the second test and the third test may be as shown in fig. 4, and fig. 4 is a schematic flow chart of an interactive function testing method based on a two-core smart meter in yet another embodiment. The first test may be a basic function test 302 based on a code to be tested, including one or more of a power-on handshake function test, a key refresh function test, a synchronous rate function test, a peripheral control function test, a real-time status symbol flashing frequency test, and a metering simulation unit data access test; the second test may be a measurement data push test 303, including one or more of an instantaneous quantity and frozen data push test, a measurement core clock data push test, a broadcast timing data push test, and an error self-monitoring data push test; the third test may be a special environment and stress test 304, which may include one or more of a metrology simulation unit exception request test, a fast refresh display request test, a fast display push test, and a two-way communication stress test. For the specific steps of each test item, reference may be made to the above definition of the steps of each test item, which is not described herein again.
Through the embodiment, the test equipment 102 can design test items aiming at the interactive functions in the new-generation intelligent electric meter, adapts to the software and hardware structure of the new-generation intelligent electric meter, and realizes the test of the double-core interactive functions of the new-generation intelligent electric meter.
It should be understood that although the various steps in the flowcharts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 5, there is provided an interactive function testing apparatus based on a two-core smart meter, including: an acquisition module 500, a test module 502, and a generation module 504, wherein:
an obtaining module 500, configured to obtain a code to be tested; the code to be tested comprises a code used for realizing an interactive function in the intelligent electric meter.
The test module 502 is configured to determine a plurality of test items corresponding to the interactive function, and test the code to be tested for each test item to obtain a corresponding test result; the plurality of test items comprise basic function tests, data pushing tests and special environment and pressure tests based on the codes to be tested, the basic function tests based on the codes to be tested comprise tests on basic functions of the codes to be tested, the data pushing tests comprise tests on pushing functions of the codes to be tested, and the special environment and pressure tests comprise tests on exception handling of the codes to be tested.
The generating module 504 is configured to generate a test report corresponding to the code to be tested according to the test result.
In an embodiment, the testing module 502 is specifically configured to perform a power-on handshake test on a code to be tested, so as to obtain a test result of the power-on handshake test; the power-on handshake test comprises the steps of testing whether the code to be tested can correctly display the address of the modified metering core in the intelligent electric meter and whether the instantaneous quantity data sent by the metering core can be correctly received; performing a key refreshing test on the code to be tested to obtain a test result of the key refreshing test; the key refreshing test comprises the step of testing whether the code to be tested can correctly respond and displaying the case refreshing display request of the metering core; carrying out synchronous data test on the code to be tested to obtain a test result of the synchronous data test; the synchronous data test comprises the steps of testing whether the code to be tested can send a preset data frame to the metering core at preset time and whether the response frame returned by the metering core for the preset data frame can be correctly analyzed; performing peripheral control test on the code to be tested to obtain a test result of the peripheral control test; the peripheral control test comprises the steps of testing whether the code to be tested can correctly push a preset peripheral control instruction to the metering core and whether the response frame returned by the metering core aiming at the peripheral control instruction can be correctly analyzed; carrying out real-time status symbol flicker frequency test on the code to be tested to obtain a test result of the real-time status symbol flicker frequency test; the real-time state symbol flicker frequency test comprises the steps of testing whether a code to be tested can push a state symbol setting instruction comprising preset flicker frequency to the metering core or not and whether a response frame returned by the metering core according to the state symbol setting instruction can be correctly analyzed or not; carrying out measurement simulation unit data access test on the code to be tested to obtain a test result of the measurement simulation unit data access test; the measurement simulation unit data access test comprises the step of testing whether the code to be tested can transparently forward the access instruction to the measurement simulation unit in the intelligent electric meter and whether the response frame returned by the measurement simulation unit aiming at the access instruction can be correctly analyzed.
In one embodiment, the above apparatus further comprises: the first test result acquisition module is used for obtaining a test result of the basic function test based on the code to be tested according to one or more items of a test result of the power-on handshake test, a test result of the key refreshing test, a test result of the synchronous data test, a test result of the peripheral control test, a test result of the real-time state symbol flashing frequency test and a test result of the data access test of the metering simulation unit.
In an embodiment, the test module 502 is specifically configured to obtain a plurality of access instructions for a metering simulation unit in the smart meter; the plurality of access instructions comprise at least two of a reading instruction, a time setting instruction, a date setting instruction, a broadcast timing instruction, a multifunctional terminal switching instruction and a zero clearing instruction; traversing and sending a plurality of access instructions to a metering simulation unit through a code to be tested, and acquiring output results of the code to be tested aiming at the plurality of access instructions; the metering simulation unit is used for returning a corresponding response frame to the code to be tested according to the type of the access instruction after receiving the plurality of access instructions; and acquiring an analysis result of the code to be tested on the response frame, and acquiring a test result of the data access test of the metering simulation unit according to the output result and the analysis result.
In an embodiment, the testing module 502 is specifically configured to perform an instantaneous quantity and frozen data push test on a code to be tested, so as to obtain a test result of the instantaneous quantity and frozen data push test; the transient quantity and frozen data push test comprises the steps of judging whether a code to be tested can be correctly analyzed and executing a transient quantity synchronization instruction and a frozen data synchronization instruction which are sent by an upper computer and aim at the intelligent electric meter, and judging whether a response frame can be returned according to the transient quantity synchronization instruction and the frozen data synchronization instruction for testing; carrying out measurement core clock data push test on the code to be tested to obtain a test result of the measurement core clock data push test; the measurement core clock data push test comprises the steps of testing whether a code to be tested can be analyzed and executing a preset clock data synchronization instruction which is sent by an upper computer and aims at the intelligent electric meter; carrying out broadcast timing data push test on the code to be tested to obtain a test result of the broadcast timing data push test; the broadcast timing data push test comprises the steps of judging whether a code to be tested can be analyzed and sending a preset broadcast timing instruction pushed by a metering simulation unit to a management core in the intelligent ammeter so as to enable the time of the metering core to be consistent with that of the management core to be tested; carrying out error self-monitoring data push test on the code to be tested to obtain a test result of the error self-monitoring data push test; the error self-monitoring data push test comprises the steps of analyzing whether an interval setting instruction sent by an upper computer is analyzed for a code to be tested, and obtaining time scale data sent by a metering core according to a preset time interval corresponding to the interval setting instruction to test.
In one embodiment, the above apparatus further comprises: and the second test result acquisition module is used for acquiring a test result of the data push test according to one or more of a test result of the instantaneous quantity and frozen data push test, a test result of the measurement core clock data push test, a test result of the broadcast timing data push test and a test result of the error self-monitoring data push test.
In an embodiment, the test module 502 is specifically configured to perform a measurement simulation unit exception request test on a code to be tested, so as to obtain a test result of the measurement simulation unit exception request test; the measurement simulation unit exception request test comprises the steps of testing whether a code to be tested can analyze a preset exception data instruction sent by an upper computer and whether the execution of the preset exception data instruction can be stopped; carrying out display test on the code to be tested to obtain a test result of the display test; the display test comprises the steps that whether the code to be tested can transmit preset data to a display screen of the intelligent ammeter according to a trigger instruction with a preset frequency and a push instruction with the preset frequency or not so that the display screen can display the preset data to test; carrying out bidirectional communication pressure test on the code to be tested to obtain a test result of the bidirectional communication pressure test; the bidirectional communication pressure test comprises the steps of transmitting preset data to the display screen after a trigger instruction of preset frequency is detected when a to-be-tested code can transmit a backlight switch instruction aiming at the display screen according to a preset time interval, so that the display screen displays the preset data for testing.
In one embodiment, the above apparatus further comprises: and the third test result acquisition module is used for acquiring the test result of the special environment and pressure test according to the test result of the abnormal request test of the metering simulation unit, the test result of the display test and the test result of the two-way communication pressure test.
In an embodiment, the testing module 502 is specifically configured to obtain a display instruction for a code to be tested; the display instruction comprises a trigger instruction of preset frequency triggered by a preset key in the intelligent electric meter and/or a push instruction of the preset frequency in the intelligent electric meter; if the display instruction is the trigger instruction of the preset frequency, transmitting the trigger instruction of a metering core in the intelligent ammeter based on the preset frequency to a display screen in the intelligent ammeter through a code to be tested, and generating data according to a preset rule; if the display instruction is a push instruction with a preset frequency, transmitting the push instruction based on the preset frequency by a metering core in the electric meter to a display screen in the intelligent electric meter through a code to be tested, and generating data according to a preset rule; and according to the display screen, a test result of the display test is obtained according to the display result of the data based on the trigger instruction of the preset frequency and/or the push instruction of the preset frequency.
In an embodiment, the testing module 502 is specifically configured to obtain a backlight switching instruction for a display screen; the backlight switch instruction comprises a lighting instruction and a blanking instruction; transmitting a backlight switching instruction to a display screen through a code to be tested, and acquiring a response result of the display screen to the backlight switching instruction; acquiring message sending time and response message receiving time of the code to be tested based on the backlight switch instruction, and acquiring interval time according to the message sending time and the response message receiving time; responding to a trigger instruction based on a preset frequency triggered by a preset key in the intelligent electric meter, sending preset data to a display screen through a code to be tested according to a preset rule, and obtaining a display result of the display screen on the preset data; and obtaining a test result of the bidirectional communication pressure test according to the response result, the interval time and the display result.
For specific limitations of the interactive function testing device based on the two-core smart meter, reference may be made to the above limitations of the interactive function testing method based on the two-core smart meter, and details are not repeated here. All modules in the interactive function testing device based on the double-core intelligent electric meter can be completely or partially realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a test device, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by the processor to realize the interactive function testing method based on the double-core intelligent ammeter. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned interactive function testing method based on the two-core smart electric meter.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the above-mentioned interactive function testing method based on a two-core smart electric meter.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An interactive function testing method based on a double-core smart electric meter is characterized by comprising the following steps:
acquiring a code to be tested; the code to be tested comprises a code used for realizing an interactive function in the intelligent ammeter;
determining a plurality of test items corresponding to the interactive function, and testing the codes to be tested respectively aiming at each test item to obtain corresponding test results; the plurality of test items comprise basic function tests based on codes to be tested, data push tests based on the codes to be tested and special environment and pressure tests based on the codes to be tested, the basic function tests based on the codes to be tested comprise tests of basic functions of the codes to be tested, the data push tests based on the codes to be tested comprise tests of push functions of the codes to be tested, and the special environment and pressure tests based on the codes to be tested comprise tests of exception handling of the codes to be tested;
the base functional test includes one or more of: the method comprises the following steps of performing a power-on handshake test, a key refreshing test, a synchronous data test, an external control test, a real-time state symbol flicker frequency test and a metering simulation unit data access test; the metering simulation unit is obtained by simulating a metering unit in the intelligent ammeter and is used for realizing the function of the metering unit;
the data push test comprises one or more of the following: the method comprises the following steps of (1) carrying out instantaneous quantity and frozen data push test, metering core clock data push test, broadcast timing data push test and error self-monitoring data push test;
the special environment and pressure test comprises one or more of the following: the method comprises the following steps that (1) a measurement simulation unit requests for testing, display testing and bidirectional communication pressure testing;
and generating a test report corresponding to the code to be tested according to the test result.
2. The method of claim 1, wherein the performing of the basic function test based on the code to be tested comprises one or more of:
carrying out a power-on handshake test on the code to be tested to obtain a test result of the power-on handshake test; the power-on handshake test comprises the steps of testing whether the code to be tested can correctly display the address of the modified metering core in the intelligent electric meter and whether the instantaneous quantity data sent by the metering core can be correctly received;
performing a key refreshing test on the code to be tested to obtain a test result of the key refreshing test; the key refreshing test comprises testing whether the code to be tested can correctly respond and displaying a key refreshing display request of the metering core;
performing synchronous data test on the code to be tested to obtain a test result of the synchronous data test; the synchronous data test comprises the step of testing whether the code to be tested can send a preset data frame to the metering core at a preset time and whether the response frame returned by the metering core for the preset data frame can be correctly analyzed;
performing peripheral control test on the code to be tested to obtain a test result of the peripheral control test; the peripheral control test comprises the steps of testing whether the code to be tested can correctly push a preset peripheral control instruction to the metering core and whether the response frame returned by the metering core for the peripheral control instruction can be correctly analyzed;
carrying out real-time status symbol flicker frequency test on the code to be tested to obtain a test result of the real-time status symbol flicker frequency test; the real-time state symbol flashing frequency test comprises the steps of testing whether the code to be tested can push a state symbol setting instruction comprising preset flashing frequency to the metering core or not and whether a response frame returned by the metering core aiming at the state symbol setting instruction can be correctly analyzed or not;
carrying out measurement simulation unit data access test on the code to be tested to obtain a test result of the measurement simulation unit data access test; the measurement simulation unit data access test comprises the step of testing whether the code to be tested can transparently forward an access instruction to a measurement simulation unit in the intelligent electric meter and whether a response frame returned by the measurement simulation unit aiming at the access instruction can be correctly analyzed; the metering simulation unit is obtained by simulating a metering unit in the intelligent ammeter and is used for realizing the function of the metering unit;
the method further comprises the following steps:
and obtaining a test result of the basic function test based on the code to be tested according to one or more of a test result of the power-on handshake test, a test result of the key refreshing test, a test result of the synchronous data test, a test result of the peripheral control test, a test result of the real-time state symbol flashing frequency test and a test result of the metering simulation unit data access test.
3. The method of claim 2, wherein performing a metrology simulation unit data access test on the code to be tested to obtain a test result of the metrology simulation unit data access test comprises:
acquiring and analyzing a plurality of access instructions which are sent by an upper computer and aim at a metering simulation unit in the intelligent electric meter; the plurality of access instructions comprise at least two of a reading instruction, a time setting instruction, a date setting instruction, a broadcast timing instruction, a multifunctional terminal switching instruction and a zero clearing instruction;
through the code to be tested, the multiple access instructions are sent to the metering simulation unit in a traversing mode, and the output result of the code to be tested aiming at the multiple access instructions is obtained; the metering simulation unit is used for returning a corresponding response frame to the code to be tested according to the type of the access instruction after receiving the access instructions;
and acquiring an analysis result of the code to be tested on the response frame, and acquiring a test result of the data access test of the metering simulation unit according to the output result and the analysis result.
4. The method of claim 1, wherein the performing data push testing on the code to be tested comprises one or more of:
carrying out an instantaneous quantity and frozen data push test on the code to be tested to obtain a test result of the instantaneous quantity and frozen data push test; the pushing test of the instantaneous quantity and the frozen data comprises the steps of testing whether the code to be tested can be correctly analyzed and executing an instantaneous quantity synchronization instruction and a frozen data synchronization instruction which are sent by an upper computer and aim at the intelligent electric meter and whether a response frame can be returned according to the instantaneous quantity synchronization instruction and the frozen data synchronization instruction;
carrying out measurement core clock data push test on the code to be tested to obtain a test result of the measurement core clock data push test; the measurement core clock data push test comprises the steps of testing whether the code to be tested can be analyzed and executing a preset clock data synchronization instruction which is sent by an upper computer and aims at the intelligent electric meter;
carrying out broadcast timing data push test on the code to be tested to obtain a test result of the broadcast timing data push test; the broadcast timing data pushing test comprises the steps of judging whether the code to be tested can be analyzed and sending a preset broadcast timing instruction pushed by a metering simulation unit to a management core in the intelligent ammeter so as to enable the time of the metering core to be consistent with that of the management core for testing;
carrying out error self-monitoring data push test on the code to be tested to obtain a test result of the error self-monitoring data push test; the error self-monitoring data push test comprises the steps of analyzing whether the code to be tested analyzes an interval setting instruction sent by an upper computer or not and obtaining time scale data sent by the metering core according to a preset time interval corresponding to the interval setting instruction to test;
the method further comprises the following steps:
and obtaining the test result of the data push test according to one or more of the test result of the instantaneous quantity and frozen data push test, the test result of the metering core clock data push test, the test result of the broadcast timing data push test and the test result of the error self-monitoring data push test.
5. The method of claim 1, wherein the special environment and stress testing of the code to be tested comprises one or more of:
carrying out measurement simulation unit exception request test on the code to be tested to obtain a test result of the measurement simulation unit exception request test; the measurement simulation unit exception request test comprises the step of testing whether the code to be tested can analyze a preset exception data instruction sent by an upper computer and whether the execution of the preset exception data instruction can be stopped;
performing display test on the code to be tested to obtain a test result of the display test; the display test comprises the steps that whether the code to be tested can transmit preset data to a display screen of the intelligent ammeter according to a trigger instruction with a preset frequency and a push instruction with the preset frequency or not so that the display screen can display the preset data for testing;
carrying out bidirectional communication pressure test on the code to be tested to obtain a test result of the bidirectional communication pressure test; the bidirectional communication pressure test comprises the steps that when a backlight switch instruction aiming at the display screen can be transmitted according to a preset time interval or not by the code to be tested, after a trigger instruction of a preset frequency is detected, the preset data are transmitted to the display screen, so that the display screen can test the preset data;
the method further comprises the following steps:
and obtaining the test result of the special environment and pressure test according to one or more of the test result of the abnormal request test of the metering simulation unit, the test result of the display test and the test result of the bidirectional communication pressure test.
6. The method of claim 5, wherein the performing a display test on the code to be tested to obtain a test result of the display test comprises:
acquiring a display instruction aiming at the code to be tested; the display instruction comprises a preset frequency triggering instruction triggered by a preset key in the intelligent electric meter and/or a preset frequency pushing instruction in the intelligent electric meter;
if the display instruction is the trigger instruction of the preset frequency, transmitting the trigger instruction of the metering core in the intelligent ammeter based on the preset frequency to a display screen in the intelligent ammeter through the code to be tested, and generating data according to a preset rule;
if the display instruction is a push instruction with the preset frequency, transmitting the push instruction based on the preset frequency by a metering core in the electric meter to a display screen in the intelligent electric meter through the code to be tested, and generating data according to a preset rule;
and according to the display screen, based on the trigger instruction of the preset frequency and/or the push instruction of the preset frequency, obtaining a test result of the display test on the display result of the data generated according to the preset rule.
7. The method of claim 5, wherein performing the bi-directional communication stress test on the code to be tested to obtain the test result of the bi-directional communication stress test comprises:
acquiring a backlight switching instruction aiming at the display screen; the backlight switch instruction comprises a lighting instruction and a blanking instruction;
transmitting the backlight switching instruction to the display screen through the code to be tested, and acquiring a response result of the display screen to the backlight switching instruction;
acquiring message sending time and response message receiving time of the code to be tested based on the backlight switch instruction, and acquiring interval time according to the message sending time and the response message receiving time;
responding to a trigger instruction of a preset frequency triggered by a preset key in the intelligent electric meter, sending preset data to the display screen according to a preset rule through the code to be tested, and acquiring a display result of the display screen on the preset data;
and obtaining a test result of the bidirectional communication pressure test according to the response result, the interval time and the display result.
8. The utility model provides an interactive function testing arrangement based on two-core smart electric meter which characterized in that, the device includes:
the acquisition module is used for acquiring a code to be tested; the code to be tested comprises a code used for realizing an interactive function in the intelligent ammeter;
the test module is used for determining a plurality of test items corresponding to the interactive functions, and testing the codes to be tested respectively aiming at each test item to obtain corresponding test results; the plurality of test items comprise basic function tests based on codes to be tested, data push tests based on the codes to be tested and special environment and pressure tests based on the codes to be tested, the basic function tests based on the codes to be tested comprise tests of basic functions of the codes to be tested, the data push tests based on the codes to be tested comprise tests of push functions of the codes to be tested, and the special environment and pressure tests based on the codes to be tested comprise tests of exception handling of the codes to be tested;
the base functional test includes one or more of: the method comprises the following steps of performing a power-on handshake test, a key refreshing test, a synchronous data test, an external control test, a real-time state symbol flicker frequency test and a metering simulation unit data access test; the metering simulation unit is obtained by simulating a metering unit in the intelligent ammeter and is used for realizing the function of the metering unit;
the data push test comprises one or more of the following: the method comprises the following steps of (1) carrying out instantaneous quantity and frozen data push test, metering core clock data push test, broadcast timing data push test and error self-monitoring data push test;
the special environment and pressure test comprises one or more of the following: the method comprises the following steps that (1) a measurement simulation unit requests for testing, display testing and bidirectional communication pressure testing;
and the generating module is used for generating a test report corresponding to the code to be tested according to the test result.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011213845.0A 2020-11-04 2020-11-04 Interactive function testing method and device based on double-core intelligent electric meter Active CN112098924B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011213845.0A CN112098924B (en) 2020-11-04 2020-11-04 Interactive function testing method and device based on double-core intelligent electric meter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011213845.0A CN112098924B (en) 2020-11-04 2020-11-04 Interactive function testing method and device based on double-core intelligent electric meter

Publications (2)

Publication Number Publication Date
CN112098924A CN112098924A (en) 2020-12-18
CN112098924B true CN112098924B (en) 2021-02-23

Family

ID=73784583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011213845.0A Active CN112098924B (en) 2020-11-04 2020-11-04 Interactive function testing method and device based on double-core intelligent electric meter

Country Status (1)

Country Link
CN (1) CN112098924B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112684405B (en) * 2020-12-21 2022-12-02 国家电网有限公司 Management core simulation system and method with switching value control function
CN112666389B (en) * 2021-01-07 2022-07-29 南方电网数字电网研究院有限公司 Double-core interaction method and device for double-core intelligent electric meter, double-core intelligent electric meter and medium
CN112887171B (en) * 2021-02-03 2022-07-29 南方电网数字电网研究院有限公司 Response rate testing method and device of electric energy meter operating system and computer equipment
CN112858993B (en) * 2021-02-20 2023-06-13 南方电网数字电网科技(广东)有限公司 Double-core electric energy meter test system
CN113064110B (en) * 2021-03-17 2023-02-17 南方电网数字电网研究院有限公司 Synchronous testing method, device, equipment and medium for double-core intelligent electric meter
CN113050020B (en) * 2021-03-25 2024-05-03 深圳供电局有限公司 Out-of-tolerance event recording method and device for double-core intelligent ammeter and computer equipment
CN113358924B (en) * 2021-04-30 2022-12-06 南方电网数字电网研究院有限公司 Multithreading double-core smart electric meter time-sharing metering processing method and device
CN113687294B (en) * 2021-08-12 2023-06-16 深圳供电局有限公司 Testing method and device for dual-core intelligent ammeter, computer equipment and storage medium
CN113821469A (en) * 2021-09-23 2021-12-21 深圳市元征科技股份有限公司 Multiprocessor synchronization method, device, terminal equipment and storage medium
CN115173569B (en) * 2022-09-08 2023-01-20 北京智芯微电子科技有限公司 Power distribution equipment testing method, device, equipment and medium based on BS (browser/server) framework

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201464636U (en) * 2009-07-13 2010-05-12 北京市电力公司 Detection device for network electric energy meter
CN202041636U (en) * 2011-03-21 2011-11-16 深圳深宝电器仪表有限公司 Electric energy meter delivery automation detection system
CN102967846B (en) * 2012-12-11 2015-02-18 江苏卡欧万泓电子有限公司 Fault self-checking method for intelligent ammeter
CN103067100A (en) * 2012-12-19 2013-04-24 云南电力试验研究院(集团)有限公司电力研究院 Intelligent ammeter communication receiving performance testing system and method
CN107453934A (en) * 2016-05-31 2017-12-08 北京信威通信技术股份有限公司 A kind of method of testing, apparatus and system
CN106569166B (en) * 2016-10-17 2019-08-13 中国电力科学研究院 A kind of test method in twin-core electric energy meter legality measurement portion
CN106569164B (en) * 2016-10-17 2019-04-23 国家电网公司 A kind of synchronous detecting method and system of twin-core electric energy meter electricity
CN107340493B (en) * 2017-06-22 2019-11-08 南方电网科学研究院有限责任公司 Take the mode switch function test method and system of control electric energy meter
CN208953594U (en) * 2018-08-20 2019-06-07 贵州电网有限责任公司 A kind of electric energy meter legality measurement and non-legal system functional hardware separator
CN110133338B (en) * 2019-05-16 2021-03-30 国网重庆市电力公司电力科学研究院 Double-core electric energy meter and display method

Also Published As

Publication number Publication date
CN112098924A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN112098924B (en) Interactive function testing method and device based on double-core intelligent electric meter
CN111459794A (en) Communication network testing method, device, computer equipment and storage medium
CN102624576B (en) A kind of method and system of web page download time of automatic test browser
CN109633351B (en) Intelligent IT operation and maintenance fault positioning method, device, equipment and readable storage medium
CN110493812B (en) Distribution network test processing method, device and system, processor and master control equipment
CN105120483B (en) Automatic testing method and system for compatibility of smart card and mobile terminal
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN104834597A (en) Method and system for measuring application response duration
CN102467442A (en) Software testing method, system and equipment
CN108874672A (en) Application exception localization method, device, equipment and storage medium
CN111934908A (en) Internet of things simulation method, device and system and storage medium
CN114167132B (en) Power consumption detection method and device of wireless terminal, electronic equipment and storage medium
CN110704148A (en) Method and device for acquiring device page elements, server and storage medium
CN111088998A (en) Coal mine central station monitoring system testing method and device and substation simulation system
CN112822073B (en) Test method, device, system, electronic equipment and readable storage medium
CN110298001B (en) Method and device for acquiring log data packet and computer readable storage medium
CN113468237B (en) Business data processing model generation method, system construction method and device
CN105095093A (en) Intelligent terminal performance test method and system
CN106407062B (en) Industry control chip debugging system and adjustment method
CN205621035U (en) Power transmission and distribution technology card management system
CN115422298A (en) Interface information synchronization method and device, computer equipment and storage medium
CN112858993B (en) Double-core electric energy meter test system
CN210629520U (en) Network message recording and analyzing device
CN110069416B (en) Test data processing method and device and related equipment
CN112559255B (en) Method, system, device and storage medium for testing file mount recovery

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
GR01 Patent grant
GR01 Patent grant