CN113704099A - Test script generation method and equipment for spacecraft power system evaluation - Google Patents

Test script generation method and equipment for spacecraft power system evaluation Download PDF

Info

Publication number
CN113704099A
CN113704099A CN202110962079.6A CN202110962079A CN113704099A CN 113704099 A CN113704099 A CN 113704099A CN 202110962079 A CN202110962079 A CN 202110962079A CN 113704099 A CN113704099 A CN 113704099A
Authority
CN
China
Prior art keywords
test
unit
data
state setting
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110962079.6A
Other languages
Chinese (zh)
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.)
Beijing Zhongke Qixin Software Technology Co ltd
Beijing Institute of Spacecraft System Engineering
Original Assignee
Beijing Zhongke Qixin Software Technology Co ltd
Beijing Institute of Spacecraft System Engineering
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 Beijing Zhongke Qixin Software Technology Co ltd, Beijing Institute of Spacecraft System Engineering filed Critical Beijing Zhongke Qixin Software Technology Co ltd
Priority to CN202110962079.6A priority Critical patent/CN113704099A/en
Publication of CN113704099A publication Critical patent/CN113704099A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention relates to a test script generation method and equipment for spacecraft power system evaluation, wherein the method comprises the following steps: receiving first user input, wherein the first user input configures test units contained in a test task and execution logic among the test units; generating test directory data according to the first user input; for each test unit configured, receiving a second user input corresponding to the test unit, the second user input configuring task parameters of the test unit; and generating a test script configuration, wherein the test script configuration comprises test directory data and task parameters of each test unit. Compared with the direct configuration of the SCPI instruction, the test script configuration has good readability, the whole test task and each part of the test task can be known based on the test script configuration, and the modification and other maintenance are easy to carry out.

Description

Test script generation method and equipment for spacecraft power system evaluation
Technical Field
The disclosure relates to the field of spacecraft power system evaluation, in particular to a test script generation method and equipment for spacecraft power system evaluation.
Background
In the test of the power supply and distribution system of the spacecraft, the test range is wide, and the test range comprises a system level, a sub-system level, a subsystem level, a device level, a module level, a component level and the like; the test has multiple dimensions including electromechanical interface, electrical performance, reliability, service life, software engineering, technical maturity and the like. Therefore, the computer assistance is introduced, so that the automation in the test process is realized to a certain extent, the time resource and the human resource occupied by the test work are reduced, and the accuracy and the confidence coefficient of the test work are further enhanced.
During testing, commands (including but not limited to SCPI commands) need to be continuously sent to the test instrument in order to perform data collection or remote control on the test instrument. These SCPI instructions are test scripts. However, the readability of the single or multiple instructions in a test script is poor, and the combined functions of the instructions cannot be intuitively understood or the functions of the instructions in the whole script are played; and also does not facilitate maintenance such as modification.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present disclosure provides a test script generation method and device for spacecraft power system evaluation.
In a first aspect, the present disclosure provides a test script generation method for spacecraft power system evaluation, which is applied to electronic devices, and includes: receiving a first user input, wherein the first user input configures a test unit included in a test task and execution logic between the test units, and the type of the test unit comprises: the device comprises a data recording unit, a data monitoring unit and a state setting unit, wherein the data recording unit is used for collecting and recording evaluation data, the data monitoring unit is used for monitoring the evaluation data, and the state setting unit is used for setting the state of a test instrument; generating test directory data according to the first user input; for each test unit of the configuration, receiving a second user input corresponding to the test unit, the second user input configuring task parameters of the test unit, wherein the task parameters of the data recording unit include: identification information of the data acquisition instruction; the task parameters of the data monitoring unit include: identification information and monitoring conditions of the data acquisition instructions; the task parameters of the state setting unit include: identification information and a target state of the state setting instruction; and generating a test script configuration, wherein the test script configuration comprises test directory data and task parameters of each test unit.
In some embodiments, the execution logic is configured by a flow control unit, the type of flow control unit comprising at least one of: a timing control configured to specify execution timings of the test units, the execution timings including: absolute time and relative time; a condition control configured to specify a target test unit to jump to when a monitoring condition of the data monitoring unit is satisfied; a steering control configured to designate a subsequent test unit of the test units; loop control configured to specify a loop start value, a loop step size, and a loop end value of the test unit.
In some embodiments, the task parameters of the data recording unit further include: frequency of data acquisition and/or data storage index.
In some embodiments, the task parameters of the data monitoring unit further comprise: the frequency of data collection and/or termination conditions of data monitoring.
In some embodiments, the state setting unit is configured to execute a plurality of state setting instructions, the task parameters of the state setting unit comprising: instruction identification information of a plurality of state setting instructions, and an execution order of the plurality of state setting instructions, wherein the execution order includes: synchronous execution and sequential execution.
In some embodiments, the frequency of data acquisition includes: a frequency set point, or a frequency indication.
In some embodiments, the instruction identification information of the state setting instruction includes: instrument ID and channel number.
In some embodiments, further comprising: the test script configuration is displayed with a graphical user interface, wherein the graphical user interface includes a first visual element corresponding to the test units and a second visual element corresponding to the execution logic between the test units.
In a second aspect, the present disclosure provides an electronic device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor; the computer program, when executed by a processor, implements the steps of any of the methods of the present disclosure.
In a third aspect, the present disclosure provides a computer-readable storage medium, where a test script generation program for spacecraft power system evaluation is stored on the computer-readable storage medium, and when the test script generation program is executed by a processor, the steps of any one of the test script generation methods of the present disclosure are provided.
Compared with the related art, the technical scheme provided by the embodiment of the disclosure has the following advantages: according to the method provided by the embodiment of the disclosure, the execution logic between the test unit and the test unit included in the test task is configured, the test directory data is generated, the task parameter of the test unit is configured, the test script configuration including the test directory data and the test unit task parameter is generated, and the test script or the test command is generated according to the test script configuration.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic structural diagram illustrating an embodiment of a system for evaluating a spacecraft power system according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of an embodiment of a test script generation method for spacecraft power system evaluation according to an embodiment of the present disclosure;
fig. 3 is a block diagram illustrating a structure of an embodiment of a test script generating apparatus for spacecraft power system evaluation according to an embodiment of the present disclosure;
fig. 4 is a hardware schematic diagram of an implementation manner of an electronic device according to an embodiment of the present disclosure.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the disclosure and are not intended to limit the disclosure.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of explanation of the present disclosure, and have no specific meaning in themselves. Thus, "module", "component" or "unit" may be used mixedly.
Fig. 1 is a schematic structural diagram of an embodiment of a system for evaluating a spacecraft power supply system according to an embodiment of the present disclosure, as shown in fig. 1, the system includes: test instrument 10, controller 20, server 30, and client 50. The test instrument 10 may be directly connected to the controller 20 or connected through the switch 40. The test instrument 10 may be connected to the server 30, where the server 30 functions as a controller. The controller 20 and the server 30 may be connected via a switch 40. The server 30 and the client 50 may be connected through a switch 40. Hereinafter, the controller and the server are collectively referred to as a node in some cases. At least a portion of the test instrument 10 is a single-threaded device, but is not so limited.
In the embodiment of the present disclosure, the controller 20 may include an electronic device such as a personal computer, for example, a computer running Windows or macOS, or may also be a portable electronic device such as a smart phone, which is not limited in the embodiment of the present disclosure.
In the embodiment of the present disclosure, the server 20 may be a personal computer or a server device, which is not limited in the embodiment of the present disclosure.
In the disclosed embodiment, the client 50 is used to initiate a test, display various test data, and set various test parameters. The server 30 acts as an intermediary for communication between the controller 20 and the client 50. The control engine 20 is used to collect data from the test instruments 10 and to perform setup operations on the test instruments 10.
In the disclosed embodiment, the client 50 initiates a test, periodically collects parameters (e.g., voltage, current, etc.) from the test instrument 10, and the test instrument 10 tests parameters of the spacecraft power system. The client 50 initiates a state setting, changing the state of the test instrument 10. The control engine 20 receives the status setting instruction and performs status setting on the test instrument 10.
In embodiments of the present disclosure, the test instrument 10 may include: and the solar array simulator is used for checking the shunt regulation function of the evaluated object. For example, the solar matrix simulator may include: one or more cabinets, a computer and a programmable DC power supply, each programmable DC power supply comprising one or more channels.
In embodiments of the present disclosure, the test instrument 10 may include: and the storage battery simulator is used for checking the charging control function and the discharging control function of the evaluated object. For example, the battery simulator may include one or more cabinets, computers, programmable dc power supplies, and programmable dc electronic loads, each of which includes one or more channels.
In embodiments of the present disclosure, the test instrument 10 may include: the program-controlled DC power supply is used for providing power for the object to be tested. Illustratively, each programmable dc power supply includes one or more channels.
In embodiments of the present disclosure, the test instrument 10 may include: and the program-controlled direct current electronic load is used for consuming the power output by the tested object. Illustratively, the programmable dc electronic load includes: one or more cabinets, computers, program-controlled DC electronic loads, each program-controlled DC electronic load comprising a plurality of channels.
In embodiments of the present disclosure, the test instrument 10 may include: and the power analyzer is used for measuring voltage and current. Illustratively, each power analyzer contains a plurality of voltage measurement channels and a plurality of current measurement channels.
In embodiments of the present disclosure, the test instrument 10 may include: and the frequency analyzer is used for analyzing frequency domain impedance and loop stability. Illustratively, each frequency analyzer contains one or more frequency output channels, and one or more voltage measurement channels.
In embodiments of the present disclosure, the test instrument 10 may include: and the oscilloscope is used for measuring time-domain voltage and current waveforms. Each oscilloscope contains one or more voltage measurement channels.
In embodiments of the present disclosure, the test instrument 10 may include: the multimeter is used for measuring voltage and current. Each multimeter contains one or more voltage measurement channels and current measurement channels.
In embodiments of the present disclosure, the test instrument 10 may include: and the function generator is used for outputting the specific signal.
In embodiments of the present disclosure, the test instrument 10 may include: and the power amplifier is used for amplifying the power of the signal.
In embodiments of the present disclosure, the test instrument 10 may include: LCR tester, is used for measuring reactance.
In embodiments of the present disclosure, the test instrument 10 may include: milliohmmeter for measuring small resistance.
In embodiments of the present disclosure, the test instrument 10 may include: and the data recorder is used for recording data.
It should be understood that the system for spacecraft power system evaluation shown in fig. 1 is merely an exemplary illustration of an embodiment of the present disclosure and is not a limitation of the system for spacecraft power system evaluation.
In the embodiment of the present disclosure, the remote control between the test instrument 10 and the controller 20 is implemented by using a program controlled instrument (programmable instrument) standard command Set (SCPI), but is not limited thereto. The SCPI is a standardized instrument programming language which is established on the basis of the existing standards of IEEE488.1 and IEEE 488.2 and conforms to a plurality of standards of floating point operation rules, ISO646 information exchange 7-bit encoding symbols (equivalent to ASCll programming) and the like in the IEEE754 standard. It adopts a set of command set with tree-like hierarchical structure, is a universal instrument model, and adopts signal-oriented measurement.
The instructions in the standard command set of the program-controlled instrument (programmable instrument) correspond to one-time press keys on the panel of the equipment, and in a remote operation mode, one or more SCPI commands can complete the same work. The plurality of instructions comprise an instruction set.
Embodiments of the present disclosure are described below on the basis of the system shown in fig. 1.
The embodiment of the disclosure provides a test script generation method for spacecraft power system evaluation, which is applied to electronic equipment (a server 30 and/or a controller 20).
Fig. 2 is a flowchart of an embodiment of a method for generating a test script for spacecraft power system evaluation according to an embodiment of the present disclosure, as shown in fig. 2, the method includes steps S202 to S208.
Step S202, receiving a first user input, wherein the first user input configures test units included in the test task and execution logic among the test units.
In the embodiment of the disclosure, the test unit is a unit for completing a test function, and a plurality of test units constitute a test task.
In the present disclosure, the types of test units include: the device comprises a data recording unit for collecting and recording evaluation data, a data monitoring unit for monitoring the evaluation data, and a state setting unit for setting the state of the test instrument.
In some examples, one or more types of test elements may be configured for a test task, which may include multiple test elements of the same type.
For example, a test task may include multiple data logging units, each of which may be configured to record different data (e.g., voltage and current for the same test instrument) for the same test instrument, or may be configured to record the same data (e.g., voltage for multiple test instruments) for different test instruments.
For example, a test task may include one or more data recording units configured to collect and record data of one or more test instruments, and one or more data monitoring units configured to monitor data (e.g., voltage, current, etc.) of one or more test instruments.
For example, a test task may include one or more data logging units configured to collect and record data for one or more test instruments, and one or more state setting units configured to set data (e.g., set voltages, currents, etc.) for one or more test instruments.
Step S204, test directory data is generated according to the first user input.
In some embodiments of the present disclosure, the test directory data records information of the test units included in the test task, and when the test task includes a plurality of test units, records execution logic between the plurality of test units included in the test task. The information of the test unit includes attribute information of the test unit, including: the type of test unit, the name of the test unit, etc.
In some embodiments of the present disclosure, the test catalog data records information of the test task, including a name of the test task, an ID of the test task, a description of the test task, a creator of the test task, a creation time, and the like.
In some embodiments of the present disclosure, an ID is generated for a test unit configured for a test task. The relation between the IDs is used for indicating the execution logic between the test units in the test directory data, and the IDs of the pre-sequence test units and the IDs of the post-sequence test units of the test units are recorded in the test directory data.
In some embodiments of the present disclosure, the plurality of test units are executed in an order, the plurality of test units constituting a sequence of test units, the execution being in an order in which the test units appear in the sequence of test units.
Step S206, for each configured test unit, receiving a second user input corresponding to the test unit, the second user input configuring task parameters of the test unit.
In the embodiment of the present disclosure, the task parameters of the data recording unit include: identification information of the data acquisition instruction. When data acquisition is carried out or a test script is generated, the instruction for carrying out data acquisition is determined according to the corresponding relation between the identification information of the data acquisition instruction and the instruction, and the determined instruction is sent to the test instrument so as to acquire the specified data from the test instrument.
In an embodiment of the present disclosure, the task parameters of the data monitoring unit include: identification information and monitoring conditions of the data acquisition instructions. When data monitoring is carried out or a test script is generated, the instruction for carrying out data acquisition is determined according to the corresponding relation between the identification information of the data acquisition instruction and the instruction, the determined instruction is sent to the test instrument so as to acquire the specified data from the test instrument, and the data is monitored according to the monitoring condition. The monitoring condition includes a judgment logic and a judgment threshold, for example, the monitoring condition is "voltage is less than 5 v" or the like.
In an embodiment of the present disclosure, the task parameters of the state setting unit include: identification information and a target state of the state setting instruction. When the state setting is carried out or a test script is generated, the action of the state setting is determined according to the corresponding relation between the identification information of the state setting instruction and the instruction, the target of the action is determined according to the target state, the instruction of the state setting is determined based on the action and the target of the action, and the instruction is sent to the corresponding test instrument to set the state of the test instrument, for example, the current of the test instrument is set to be 2A.
In some embodiments of the present disclosure, the task parameters of the data recording unit further include: frequency of data acquisition and/or data storage index. The data acquisition of the test instruments has a natural frequency, for example, the maximum data acquisition frequency of some test instruments is 1 time per second, and the maximum data acquisition frequency of other test instruments is 2 times per second. In some examples, the frequency of data acquisition by the configuration data recording unit is a target value (e.g., 1 time per second, etc.), and in other examples, the frequency of data acquisition by the configuration data recording unit is a frequency indicator, such as "system," indicating that data acquisition is performed at the frequency of the test task as a whole. The frequency indication may also be a default, and if the frequency of data acquisition is insufficient, the frequency of the whole test task is used by default for data acquisition. For example, the frequency of data collection for the whole test task may be set in a configuration file, which is not limited by the present disclosure.
In some embodiments of the present disclosure, the task parameters of the data monitoring unit further include: the frequency of data collection and/or termination conditions of data monitoring. The frequency of data acquisition of the data monitoring unit is the same as the frequency of data acquisition of the data recording unit, and is not described herein. The termination condition of data monitoring includes a judgment logic and a judgment threshold, for example, the termination condition is set to "current is less than 5A", where "less than" is the judgment logic, and "5A" is the judgment threshold.
Step S208, generating a test script configuration, wherein the test script configuration comprises test directory data and task parameters of each test unit.
In some embodiments of the present disclosure, the test script configuration is stored as one or more files, the test directory data is stored in one file, and the task parameters of the test unit are stored in another file, which is not limited by the embodiments of the present disclosure.
In some embodiments of the present disclosure, execution logic between test units that are included in a test is configured by the flow control unit.
In the present disclosure, the types of the flow control unit may include: a timing control configured to specify execution timings of the test units, the execution timings including: absolute time and relative time. The pair of times is a specified time, and the relative time may be relative to an absolute time, or relative to a start or end time of the preamble test unit.
In the present disclosure, the types of the flow control unit may include: a condition control configured to specify a target test unit to jump to when the monitoring condition of the data monitoring unit is satisfied. In the present disclosure, the target test unit includes a state setting unit. For example, the monitoring condition of the data monitoring unit is "current is greater than or equal to 3A", and the condition control is set such that, when "current is greater than or equal to 3A" is satisfied, a state setting unit is entered to perform state setting such as changing the voltage of a specified test instrument or the like.
In the present disclosure, the types of the flow control unit may include: a steering control configured to designate a subsequent test unit of the test units. For example, after the specified state setting unit sets the voltage to 5V, the voltage value is monitored by the data monitoring unit for monitoring whether the voltage value is within a fluctuation range.
In the present disclosure, the types of the flow control unit may include: loop control configured to specify a loop start value, a loop step size, and a loop end value of the test unit. In the present disclosure, continuous state setting is achieved by cycle control, for example, setting the current of a certain test instrument from 1A (cycle start value) to 5A (cycle end value) and increasing by 0.5A (cycle step) each time. With this loop control, at the time of state setting, instructions to set the currents to 1A, 1.5A, 2A, 2.5A, 3A, 3.5A, 4A, 4.5A, and 5A are determined and transmitted in order.
In some embodiments of the disclosure, the state setting unit is configured to execute a plurality of state setting instructions, the task parameters of the state setting unit including: instruction identification information of a plurality of state setting instructions, and an execution order of the plurality of state setting instructions, wherein the execution order includes: synchronous execution and sequential execution.
In some embodiments of the present disclosure, the instruction identification information of the state setting instruction includes: instrument ID and channel number.
In some embodiments, the test script configuration is displayed in a graphical user interface, wherein the graphical user interface includes a first visual element corresponding to the test unit and a second visual element corresponding to the execution logic between the test units. For example, the test script configuration is shown in a flow chart manner to show the test unit included in the test task and the execution logic between the test units.
In the present disclosure, a test item may include one or more test tasks, a test task includes a test script configuration, different test items may refer to the test script configuration, and under the control of authority, one or more of the test script configurations may be distributed for use. One stage in a test project may be identical to another test project, so that the distribution of the file is beneficial to the standardized operation of the test.
In some embodiments of the present disclosure, the generation of the test script is performed when the test script configuration is saved, and can be checked, so as to find the problem in the test script configuration through the SCPI instruction in the test script, and modify the problem according to the result.
Illustratively, the test script configuration includes: the method comprises the following steps of testing task name, testing task description, testing unit number, serial number, attribute and execution condition of a single testing unit (the execution condition of a single testing step can be set as one of the following 3 items, namely immediate execution, execution at a certain absolute time, execution at a certain relative time and execution content based on the starting time of the testing step). The execution start time, the execution end time, and the like are recorded during execution.
Illustratively, the data recording unit is configured to: acquiring and recording the latest data of the specified data entry; the execution content comprises: collecting the name, code number and data value of a plurality of data items at the moment; wherein the time and data values are collected and the real data are recorded after being executed.
Illustratively, the data monitoring unit is configured to: acquiring the latest data of the specified data entry, and executing a specified logic condition until the logic value is true; the execution content comprises: collecting the name, code number, data value and logic expression of a plurality of data items at the moment; wherein the time and data values are collected and, after being executed, the actual data that makes the logical value true is recorded.
Illustratively, the flow control unit includes: by a circulation mode, more test steps can be realized by fewer characters; the execution content is as follows: the language C is a for (i ═ 1; i + +; i < ═ n) { } statement.
In some embodiments, an expression similar to natural language + technical terminology is used, so that the expression is closer to the literary requirements of the test rules, and a foundation is laid for collecting various data, graphs, instructions and the like after the test is finished in the future, automatically generating the test rules, and the like. The generated test detailed rule also ensures that the test detailed rule has the transverse comparability of a plurality of devices to be tested of the same kind after a data analysis model is added and a strategy is compared because of the diversity of data sources, and more excellent, the comparison can be completed by a computer and a comparison result is generated quickly.
In the present disclosure, during testing, the testing operation is completed by loading and running the edited "test script configuration". The test script configuration is created and edited on the client computer and is stored in the database and the local computer in an account number authority mode. After the client software loads the test script configuration, firstly, the integrity and the standardization of the client software are checked, and prompt information is given out under the condition that the client software does not meet the requirements.
Illustratively, in the present disclosure, each test cell block is composed of a control line and an instruction line, the control line characterizes the behavior of the execution of one or more subsequent lines of instructions, and the instruction line is the specific action to be performed.
Examples of the invention
The method comprises the steps of firstly compiling total control content, wherein the total control content comprises fields needing to be filled, test task names, test task descriptions, execution starting time and ending time, the number of test steps, and the serial number, the attribute and the execution condition of a single test step (the execution condition of the single test step can be set as one of the following 3 items, namely, immediate execution, execution at a certain absolute time, execution at a certain relative time, and execution content by taking the starting time of the test step as a reference); the execution starting time and the execution ending time are empty after the configuration file is created, and real data are recorded during execution. The master control is actually the catalog of each test step and the corresponding attributes. From the execution condition point of view, the whole process is performed according to time sequence.
In the data recording, according to the name, code number, index out the corresponding SCPI order, according to the set value of the acquisition frequency, go to the test equipment periodically and obtain the real-time value, fill in to the data value, while obtaining the real-time value, give the time stamp for the real-time value, fill in to the acquisition moment, in this way, have finished a data recording, because the data recording still needs to keep, with the help of the index of the physical code number, preserve to the corresponding position in the order of the time stamp. And generating a test script, and sending the test script to test equipment during actual execution.
In data monitoring, similar to data recording, according to names and codes, indexing out corresponding SCPI instructions, according to a set value of acquisition frequency, periodically obtaining a real-time value on a test device, filling the real-time value to the latest value, simultaneously obtaining the real-time value, endowing a timestamp for the real-time value, and filling the real-time value to acquisition time, thus completing preparation work of data monitoring once, then carrying out logic judgment twice, and jumping to which state setting step when the real-time value is within a threshold range once; if the termination condition is satisfied, the execution of the data monitoring step is terminated. And generating a test script, and sending the test script to test equipment during actual execution.
A state setting step, namely extracting a corresponding SCPI instruction according to the equipment ID, the channel number and the current, and adding the value of the current into the SCPI instruction; extracting a corresponding SCPI instruction according to the equipment ID, the channel number and the voltage, and adding the value of the voltage into the SCPI instruction; extracting a corresponding SCPI instruction according to the equipment ID, the channel number and the time delay, and adding a time delay value into the SCPI instruction; extracting a corresponding SCPI instruction according to the equipment ID, the channel number and the power, and adding the value of the power into the SCPI instruction; the SCPI command thus obtained, i.e., the state setting operation, is sequentially executed. And generating a test script, and sending the test script to test equipment during actual execution.
In the process control, the execution characteristics of state setting are mainly controlled, and the cyclic assignment condition of a certain state value in the state setting step is determined according to a cyclic initial value, a cyclic end value and a step length; the step of executing the ID is to directly jump to the step of executing the ID; and (4) judging the ID dependence data monitoring by the condition, and jumping to the ID step for execution after the trigger action starts. And generating a test script, and sending the test script to test equipment during actual execution.
The state setting has three execution modes: execution of a single state setting instruction, synchronous execution of a plurality of state setting instructions, and execution of a state setting instruction sequence. The execution decision conditions of all instruction entries in the state setting instruction sequence can be set, and are generally divided into two types: relative time of day, logic conditions.
The embodiment of the disclosure also provides a test script generation device for spacecraft power system evaluation, which is applied to electronic equipment.
Fig. 3 is a block diagram of a structure of an embodiment of a test script generating apparatus for spacecraft power system evaluation according to an embodiment of the present disclosure, as shown in fig. 3, the apparatus includes: the first configuration module 310 is configured to receive a first user input, where the first user input configures test units included in the test task and execution logic between the test units. The first generating module 320 is connected to the first configuring module 310, and is configured to generate the test catalog data according to the first user input. The second configuration module 330, coupled to the first configuration module 310, is configured to receive, for each test unit configured, a second user input corresponding to the test unit, the second user input configuring task parameters of the test unit. The second generating module 340 is connected to the first generating module 320 and the second configuring module 330, and configured to generate a test script configuration, where the test script configuration includes test catalog data and task parameters of each test unit.
Wherein the types of test units include: the device comprises a data recording unit for collecting and recording evaluation data, a data monitoring unit for monitoring the evaluation data, and a state setting unit for setting the state of the test instrument.
Wherein, the task parameters of the data recording unit include: identification information of the data acquisition instruction; the task parameters of the data monitoring unit include: identification information and monitoring conditions of the data acquisition instructions; the task parameters of the state setting unit include: identification information and a target state of the state setting instruction.
In some embodiments, the first configuration module 310 is configured to configure the execution logic via a flow control unit, the type of the flow control unit including at least one of: a timing control configured to specify execution timings of the test units, the execution timings including: absolute time and relative time; a condition control configured to specify a target test unit to jump to when a monitoring condition of the data monitoring unit is satisfied; a steering control configured to designate a subsequent test unit of the test units; loop control configured to specify a loop start value, a loop step size, and a loop end value of the test unit.
In some embodiments, the task parameters of the data recording unit further include: frequency of data acquisition and/or data storage index.
In some embodiments, the task parameters of the data monitoring unit further comprise: the frequency of data collection and/or termination conditions of data monitoring.
In some embodiments, the state setting unit is configured to execute a plurality of state setting instructions, the task parameters of the state setting unit comprising: instruction identification information of a plurality of state setting instructions, and an execution order of the plurality of state setting instructions, wherein the execution order includes: synchronous execution and sequential execution.
In some embodiments, the frequency of data acquisition includes: a frequency set point, or a frequency indication.
In some embodiments, the instruction identification information of the state setting instruction includes: instrument ID and channel number.
In some embodiments, the test script configuration is also displayed in a graphical user interface, wherein the graphical user interface includes a first visual element corresponding to the test unit and a second visual element corresponding to the execution logic between the test units.
The embodiment of the disclosure also provides an electronic device. Fig. 4 is a schematic diagram of a hardware structure of an implementation manner of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 4, an electronic device 410 according to an embodiment of the present disclosure includes: including at least but not limited to: a memory 411 and a processor 412 communicatively coupled to each other via a system bus. It is noted that FIG. 4 only shows electronic device 410 having components 411-412, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the memory 411 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 411 may be an internal storage unit of the electronic device 410, such as a hard disk or a memory of the electronic device 410. In other embodiments, the memory 411 may also be an external storage device of the electronic device 410, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the electronic device 410. Of course, the memory 411 may also include both internal and external memory units of the electronic device 410. In this embodiment, the memory 411 is generally used for storing an operating system and various types of software installed in the electronic device 410. Further, the memory 411 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 412 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 412 is generally used to control the overall operation of the electronic device 410. In this embodiment, the processor 412 is configured to execute program codes stored in the memory 411 or process data, such as any one or more of the methods of the embodiments of the present disclosure.
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer readable storage medium of the present embodiments stores program code of any one or more of the disclosed embodiments, which when executed by a processor implements the method of any one or more of the disclosed embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present disclosure are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present disclosure.
While the embodiments of the present disclosure have been described in connection with the drawings, the present disclosure is not limited to the specific embodiments described above, which are intended to be illustrative rather than limiting, and it will be apparent to those of ordinary skill in the art in light of the present disclosure that many more modifications can be made without departing from the spirit of the disclosure and the scope of the appended claims.

Claims (10)

1. A test script generation method for spacecraft power system evaluation is applied to electronic equipment and is characterized by comprising the following steps:
receiving a first user input, wherein the first user input configures test units included in a test task and execution logic among the test units, and the types of the test units comprise: the device comprises a data recording unit, a data monitoring unit and a state setting unit, wherein the data recording unit is used for collecting and recording evaluation data, the data monitoring unit is used for monitoring the evaluation data, and the state setting unit is used for setting the state of a test instrument;
generating test directory data according to the first user input;
for each of the configured test units, receiving a second user input corresponding to the test unit, the second user input configuring task parameters of the test unit, wherein the task parameters of the data logging unit include: identification information of the data acquisition instruction; the task parameters of the data monitoring unit include: identification information and monitoring conditions of the data acquisition instructions; the task parameters of the state setting unit include: identification information and a target state of the state setting instruction;
generating a test script configuration, wherein the test script configuration comprises the test directory data and the task parameters of each test unit.
2. The test script generation method of claim 1, wherein the execution logic is configured by a flow control unit, the type of the flow control unit comprising at least one of:
a timing control configured to specify execution timings of the test units, the execution timings including: absolute time and relative time;
a condition control configured to specify a target test unit to jump to when a monitoring condition of the data monitoring unit is satisfied;
a steering control configured to designate a subsequent test unit of the test units;
a loop control configured to specify a loop start value, a loop step size, and a loop end value of the test unit.
3. The method according to claim 1, wherein the task parameters of the data recording unit further include: frequency of data acquisition and/or data storage index.
4. The test script generation method of claim 1, wherein the task parameters of the data monitoring unit further comprise: the frequency of data collection and/or termination conditions of data monitoring.
5. The test script generation method of claim 1, wherein the state setting unit is configured to execute a plurality of the state setting instructions, and the task parameters of the state setting unit comprise: instruction identification information of a plurality of state setting instructions, and an execution order of the plurality of state setting instructions, wherein the execution order comprises: synchronous execution and sequential execution.
6. The test script generation method according to claim 3 or 4, wherein the frequency of data collection comprises: a frequency set point, or a frequency indication.
7. The test script generation method according to claim 1 or 5, wherein the instruction identification information of the state setting instruction includes: instrument ID and channel number.
8. The test script generation method according to claim 1 or 2, further comprising: displaying the test script configuration with a graphical user interface, wherein the graphical user interface includes a first visual element corresponding to the test unit and a second visual element corresponding to the execution logic between the test units.
9. An electronic device, characterized in that the electronic device comprises:
a memory, a processor, and a computer program stored on the memory and executable on the processor;
the computer program, when executed by the processor, implementing the steps of the method of any one of claims 1 to 8.
10. A computer-readable storage medium, on which a test script generation program for spacecraft power system evaluation is stored, which when executed by a processor implements the steps of the test script generation method according to any one of claims 1 to 8.
CN202110962079.6A 2021-08-20 2021-08-20 Test script generation method and equipment for spacecraft power system evaluation Pending CN113704099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110962079.6A CN113704099A (en) 2021-08-20 2021-08-20 Test script generation method and equipment for spacecraft power system evaluation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110962079.6A CN113704099A (en) 2021-08-20 2021-08-20 Test script generation method and equipment for spacecraft power system evaluation

Publications (1)

Publication Number Publication Date
CN113704099A true CN113704099A (en) 2021-11-26

Family

ID=78653720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110962079.6A Pending CN113704099A (en) 2021-08-20 2021-08-20 Test script generation method and equipment for spacecraft power system evaluation

Country Status (1)

Country Link
CN (1) CN113704099A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192672A (en) * 2022-12-16 2023-05-30 中国联合网络通信集团有限公司 Script viewing method and related equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541730A (en) * 2011-12-08 2012-07-04 北京空间飞行器总体设计部 Semantic identification and automatic generation method for spacecraft test script
CN102722437A (en) * 2012-05-29 2012-10-10 北京空间飞行器总体设计部 Spacecraft test system and spacecraft test method based on assemblies and scripts
US20140165040A1 (en) * 2012-12-07 2014-06-12 Sugarcrm Inc. Test script generation for application image validation
US20170147480A1 (en) * 2013-04-23 2017-05-25 Google Inc. Test script generation
CN108388507A (en) * 2018-01-24 2018-08-10 深圳市买买提信息科技有限公司 Batch script testing method and device
CN109634253A (en) * 2018-11-13 2019-04-16 武汉精能电子技术有限公司 A kind of automatic flow control method and system
CN109902003A (en) * 2019-02-19 2019-06-18 阿里巴巴集团控股有限公司 The generation method and device of test script
US20190188116A1 (en) * 2017-12-20 2019-06-20 10546658 Canada Inc. Automated software testing method and system
CN111258900A (en) * 2020-01-17 2020-06-09 深圳壹账通智能科技有限公司 Interface test script generation method, system, equipment and storage medium
CN112286779A (en) * 2019-07-23 2021-01-29 腾讯科技(深圳)有限公司 Test task processing method and device, storage medium and computer equipment
CN112631939A (en) * 2020-12-31 2021-04-09 广州方硅信息技术有限公司 Use case configuration method, use case configuration device, and readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541730A (en) * 2011-12-08 2012-07-04 北京空间飞行器总体设计部 Semantic identification and automatic generation method for spacecraft test script
CN102722437A (en) * 2012-05-29 2012-10-10 北京空间飞行器总体设计部 Spacecraft test system and spacecraft test method based on assemblies and scripts
US20140165040A1 (en) * 2012-12-07 2014-06-12 Sugarcrm Inc. Test script generation for application image validation
US20170147480A1 (en) * 2013-04-23 2017-05-25 Google Inc. Test script generation
US20190188116A1 (en) * 2017-12-20 2019-06-20 10546658 Canada Inc. Automated software testing method and system
CN108388507A (en) * 2018-01-24 2018-08-10 深圳市买买提信息科技有限公司 Batch script testing method and device
CN109634253A (en) * 2018-11-13 2019-04-16 武汉精能电子技术有限公司 A kind of automatic flow control method and system
CN109902003A (en) * 2019-02-19 2019-06-18 阿里巴巴集团控股有限公司 The generation method and device of test script
CN112286779A (en) * 2019-07-23 2021-01-29 腾讯科技(深圳)有限公司 Test task processing method and device, storage medium and computer equipment
CN111258900A (en) * 2020-01-17 2020-06-09 深圳壹账通智能科技有限公司 Interface test script generation method, system, equipment and storage medium
CN112631939A (en) * 2020-12-31 2021-04-09 广州方硅信息技术有限公司 Use case configuration method, use case configuration device, and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
窦钠;张红军;范延芳;王向晖;: "航天器数据管理系统软件的自动化测试系统设计", 航天器工程, no. 01 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192672A (en) * 2022-12-16 2023-05-30 中国联合网络通信集团有限公司 Script viewing method and related equipment

Similar Documents

Publication Publication Date Title
CN106874187B (en) Code coverage rate collection method and device
CN104267715A (en) Vehicle-mounted electronic control unit LIN bus communication automatic testing device and system
CN103308846B (en) Method and device for detecting functional performance of integrated chip based on model identification
CN105005015A (en) Circuit fault simulation system based on hardware circuit fault injection
CN107080945B (en) Method and device for testing artificial intelligence behaviors in game and electronic equipment
CN108984393A (en) A kind of unit testing code automatic generation method and device
EP2511841A2 (en) System and method for generation of cim-based power system circuit models
CN108595390B (en) Method for verifying parameter consistency of SCD and IED of intelligent substation
CN113704099A (en) Test script generation method and equipment for spacecraft power system evaluation
CN113778903B (en) Method and system for generating test case of power distribution terminal and storage medium
CN103777092A (en) Cloud technology based relay protection test system and method
CN110334385B (en) Test method, device and equipment for central controller of comprehensive energy system
CN103344850A (en) System and method of intelligent substation automatic testing based on test formwork technology
CN115932706A (en) Electric energy meter data analysis method, electric energy meter and storage medium
CN114879647A (en) ECU fault code test system, electronic controller and car
CN113703836A (en) SCPI instruction management method for spacecraft power system evaluation
CN111965587B (en) Automatic test method and automatic test platform for stability of electric energy meter
CN110609243B (en) Method and system for testing CPU power supply efficiency and related components
CN113485919A (en) Test method, test device and computer readable storage medium
CN111459795A (en) Cluster pressure testing method and device, computer equipment and storage medium
CN112214403B (en) Automatic test method, device and system based on protection device model file
CN114461470B (en) Memory power consumption testing method, system, equipment and storage medium
CN114778986A (en) Intelligent debugging and testing method for relay protection and safety automatic device
CN116154713A (en) Intelligent adjustment and measurement method for relay protection and safety automatic device
CN118131004A (en) Automatic detection upper computer system and test method

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