CN107451053B - Automatic testing method and system for container terminal shore bridge management system - Google Patents

Automatic testing method and system for container terminal shore bridge management system Download PDF

Info

Publication number
CN107451053B
CN107451053B CN201710616094.9A CN201710616094A CN107451053B CN 107451053 B CN107451053 B CN 107451053B CN 201710616094 A CN201710616094 A CN 201710616094A CN 107451053 B CN107451053 B CN 107451053B
Authority
CN
China
Prior art keywords
test
information
case
task
shore bridge
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
CN201710616094.9A
Other languages
Chinese (zh)
Other versions
CN107451053A (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.)
SHANGHAI ZPMC ELECTRIC Co Ltd
Shanghai Zhenghua Heavy Industries Co Ltd
Original Assignee
SHANGHAI ZPMC ELECTRIC Co Ltd
Shanghai Zhenghua Heavy Industries 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 SHANGHAI ZPMC ELECTRIC Co Ltd, Shanghai Zhenghua Heavy Industries Co Ltd filed Critical SHANGHAI ZPMC ELECTRIC Co Ltd
Priority to CN201710616094.9A priority Critical patent/CN107451053B/en
Publication of CN107451053A publication Critical patent/CN107451053A/en
Application granted granted Critical
Publication of CN107451053B publication Critical patent/CN107451053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/3688Test management for test execution, e.g. scheduling of test suites
    • 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

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)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention discloses an automatic test method and a test system for a container terminal shore bridge management system, wherein the method comprises the following steps: initializing a test environment; acquiring a path of a test case, reading, analyzing and storing the test case, wherein the test case comprises task information, test time, test action and an expected result; writing the task information into a database; reading state information of shore bridge simulation equipment in OPC and state information of tasks in a database at a certain frequency, and generating event information when monitoring that a test moment occurs; reading event information and carrying out corresponding test actions; acquiring the actual final state of the task and the equipment; and generating a test report. The system and the method can execute automatic test on the test case and can obtain the output information in the test execution process.

Description

Automatic testing method and system for container terminal shore bridge management system
Technical Field
The invention relates to a test system and a test method, in particular to an automatic test method and a test system for a container terminal shore bridge management system.
Background
The QCMS is a system for controlling and managing the shore bridge equipment of the container terminal. The work principle is that tasks sent by a wharf operating system (TOS for short) are obtained from a database at a certain frequency, task analysis and instruction decomposition are carried out, then the instructions are sent to shore bridge equipment, and the tasks or the instruction states are fed back to the TOS. The QCMS performs frequent information interaction with the TOS and the shore bridge equipment in the operation process, wherein the information interaction between the QCMS and the TOS generally passes through a database; and the communication between the QCMS and the shore bridge equipment is generally realized through an OPC protocol.
QCMS, an important, relatively independent software system, necessarily requires functional testing before being put into practical use. From the test process and the test environment, the simulation environment test and the real machine environment test can be divided into two categories, the simulation environment test is firstly carried out, and the real machine environment test is carried out on site after the basic function test is passed. In the simulation test, the shore bridge equipment is simulated by software and is not real machine equipment, and the TOS can be simulated or real; the land bridge equipment and the TOS are both real in the real machine test.
At present, a function test method of the QCMS in a simulation environment is mainly manual test, that is, a TOS or a simulator thereof is used to send a task according to information in a test case, a device simulator or the task is subjected to relevant operations required in the test case in the task execution process, and then the execution condition of the shore bridge device simulator on a task instruction and task state information fed back by the QCMS in a database are observed.
The specific working conditions involved by the wharf shore bridge are various, so that the execution efficiency of manual testing is low. In addition, some test points have high time requirements, input operation or output judgment needs to be carried out quickly, and manual test is difficult to complete.
Disclosure of Invention
In view of the above problems in the prior art, an object of the present invention is to provide an automated testing method and system for a container terminal quay crane management system.
In order to achieve the purpose, the invention adopts the following technical scheme:
an automatic testing method for a container terminal shore bridge management system comprises the following steps: initializing a test environment; acquiring a path of a test case, reading, analyzing and storing the test case, wherein the test case comprises task information, test time, test action and an expected result; writing the task information into a database; reading state information of shore bridge simulation equipment in OPC and state information of tasks in a database at a certain frequency, and generating event information when monitoring that a test moment occurs; reading event information and carrying out corresponding test actions; acquiring the final states of tasks and equipment; and generating a test report.
Further, initializing the test environment includes: setting tested objects comprising a container wharf shore bridge management system, OPC, a database, a shore bridge equipment simulator and a test case; configuring a configuration file of a test platform, wherein the configuration file comprises test environment information; and reading OPC and database information from the configuration file, and establishing communication connection among the container terminal shore bridge management system, the OPC, the database and the shore bridge equipment simulator.
In order to achieve the purpose, the invention also adopts the following technical scheme:
an automated testing system for a container terminal quay crane management system, comprising: the system comprises an automatic test platform, test cases, a database, OPC, shore bridge simulation equipment and a container terminal shore bridge management system. The automatic test platform comprises a case information reading module, a case information processing module and a task state monitoring module, the automatic test platform acquires a path of a test case, the case information reading module is used for reading, analyzing and storing the test case, and the test case comprises task information, test time, test action and expected results. And the use case information processing module writes the task information into the database and transmits the test time information to the task state monitoring module. And the task state monitoring module reads the state information of the shore bridge simulation equipment in the OPC and the state information of the tasks in the database at a certain frequency, and generates event information and transmits the event information to the use case information processing module when monitoring that the test moment occurs. And the case information processing module reads the event information, performs corresponding test actions, and the monitoring module acquires the final states of the tasks and the equipment and transmits the final states to the case information processing module.
Further, the automated testing platform also comprises a test report generation module. The case information processing module transmits the actual states of the tasks and the equipment and the expected result information in the test cases to the test report generating module, and the test report generating module generates the test report.
Further, the test time refers to a certain specific state of the task or the equipment; the test action refers to the corresponding action to be performed when the test moment occurs.
Further, the test report includes the test result of the test case and the output information of the task in the execution process.
In the technical scheme, the automatic test method and the test system of the container terminal shore bridge management system can execute automatic tests on test cases and can obtain output information in the test execution process.
Drawings
FIG. 1 is a block diagram of an automated testing system for a container terminal quay crane management system of the present invention;
fig. 2 is a flow chart of an automated testing method of the container terminal quay crane management system of the invention.
Detailed Description
The technical scheme of the invention is further explained by combining the drawings and the embodiment.
Referring to fig. 1, the invention first discloses an automated testing system of a container terminal quay crane management system, which is written in C # language for an automated testing platform of a container terminal quay crane management system (QCMS for short) in a simulation environment. As shown in fig. 1, the system of the present invention mainly includes: the system comprises an automatic test platform 1, a test case 2, a database 3, a QCMS 4, an OPC5 and a shore bridge simulation device 6. In addition, the automated testing platform 1 further includes a use case information reading module 11, a use case information processing module 12, a task status monitoring module 13, and a test report generating module 14.
OPC (OLE for Process Control ) is an industry standard, the establishment of which is based on microsoft com (component Object model) specification and is managed by the OPC foundation, an international organization. It provides a standard data access mechanism for the industrial manufacturing field. OPC defines a standard interface for hardware devices, software and systems of different manufacturers, so that different hardware devices (such as PLC, board card, smart meter, frequency converter, etc.) and third party software systems in process control and factory automation can be connected, communicated and operated conveniently. Before the OPC interface is adopted, a software system needs to communicate with different hardware devices depending on different drivers and the connection is complex. After the OPC interface is adopted, the communication with different devices can be easily realized only by providing a standard OPC interface.
According to the functional requirements, the tester only needs to write the test case according to the format agreed in advance by the test system of the invention and store the test case as a common CSV file. The CSV is a comma-separated text file, and the file stores table data (numbers and texts) in a pure text form, so that the CSV file can be conveniently edited, generated and viewed in the EXCEL. The test system can automatically analyze the test case, extract the task information in the case, send the task information to the database, monitor the relevant state of the task in the execution process, compare the task information with the expected result of the case, and finally output the test result. The testing system simulates some important functions of TOS, such as task sending, platform OCR confirmation and the like, so that the testing system of the invention is attached to a testing environment without the participation of TOS, and only needs a database, OPC, a shore bridge equipment simulator and a tested object QCMS.
The specific functions of the above-mentioned several main modules are described as follows:
1) a use case information reading module: and the CSV case is responsible for reading the information in the CSV case and storing the information for other modules to use.
2) The use case information processing module: acquiring the use case information read by the use case information reading module, analyzing the use case information according to a rule agreed in advance, generating task information and sending the task information to the database. And calling a task state monitoring module to track and monitor the task, and calling a report generating module to generate a test report when the task is finished.
3) The task state monitoring module: and starting a plurality of threads, and reading related information of tasks and equipment states in the database and the OPC at a certain frequency.
4) A test report generation module: and acquiring the use case execution information in the use case information processing module, and outputting the use case execution information as a test report.
On the other hand, referring to fig. 2, aiming at the test system of the invention, the invention also discloses an automatic test method of the container terminal shore bridge management system, which mainly comprises the following steps:
s1: a test environment is initialized. The initialization further comprises the steps of:
s1.1: and setting tested objects comprising a container wharf shore bridge management system, OPC, a database, a shore bridge equipment simulator and a test case.
S1.2: and configuring a configuration file of the test platform, wherein the configuration file comprises test environment information.
S1.3: and reading OPC and database information from the configuration file, and establishing communication connection among the container terminal shore bridge management system, the OPC, the database and the shore bridge equipment simulator.
S2: and acquiring a path of the test case, reading, analyzing and storing the test case. The test case comprises task information, test time, test action and expected result.
S3: and writing the task information into a database.
S4: and reading the state information of the shore bridge simulation equipment in the OPC and the state information of tasks in a database at a certain frequency, and generating event information when monitoring the occurrence of test time.
S5: and reading the event information and carrying out corresponding test action.
S6: the final state of the task and the device is obtained and compared with the expected result.
S7: and generating a test report.
The technical solution of the present invention is further specifically described below by an embodiment with reference to fig. 1.
First, before the automated testing begins, the relevant simulation testing environment is prepared. The test environment comprises a tested object QCMS 4, OPC5, a database 3 and a shore bridge equipment simulator 6. In addition, the test case 2 needs to be prepared, and the configuration file of the automatic test platform 1 needs to be configured. The configuration file contains information in the test environment so that the automated test platform 1 knows how to contact the environment. After the automatic test platform 1 is started, information such as OPC5 and database 3 is read from the configuration file, and then communication connection is established with the information. The automated test platform 1 then performs an initialization test environment to prepare for the next execution of the use case.
After the test environment is initialized, the automatic test platform 1 acquires the path of the test case 2 from the configuration file, the case information reading module 11 of the automatic test platform 1 starts to read the information in the CSV case, and analyzes the case information according to a predetermined format and stores the case information for other modules.
As an implementation manner of this embodiment, the double-trolley shore bridge includes two trolleys, i.e., a main trolley and a gantry trolley, mt is agreed in advance to represent the main trolley, and pt represents the gantry trolley. If the type of a certain test case 2 is the updating of a test box placing target position, one case is that the TOS sends a ship unloading task, the target position is the AGV, and when the main trolley carries out a ship box grabbing instruction, the TOS changes the target position of the task into a collection card.
Besides the ship unloading task information, the test case 2 designed by the tester also contains the following key test information: the update time, the update target position and the expected target position correspond to the test time, the test action and the expected result, respectively. According to the convention, the updating time of the case is set to be mt-PickuPship, mt indicates that the case is a main car, and PickuPship indicates that the case is grabbed on the ship. The update target position and the expected destination position are both set to true, representing a card concentrator.
After the use case information is read and analyzed by the use case information reading module 11, the information is delivered to the use case information processing module 12 for processing. The use case information processing module 12 firstly writes ship unloading task information into the database 3, at the moment, the QCMS 4 starts executing tasks, then the use case information processing module 12 transmits update time information to the task state monitoring module 13 of the platform, the task state monitoring module 13 starts threads, state information of shore bridge equipment in the OPC5 and state information of tasks in the database 3 are read at a certain frequency, and when the main trolley is monitored to carry out a PickupShip instruction, event information is transmitted to the use case information processing module 12 in an event notification mode. After receiving the event notification, the use case information processing module 12 updates the task target location in the database 3 to true. The task state monitoring module 13 continues to work, and when the state of the task in the database 3 is monitored to be completed, the actual final box placing position of the task is obtained and transmitted to the use case information processing module 12.
The case information processing module 12 transmits the actual final box placing position information, the expected box placing position information in the test case 2 and the related information in the task execution process to the test report generating module 14, and the test report generating module 14 generates the test report. The test report generation module 14 generates the test result of the test case 2 according to the information, and also outputs the relevant information in the task execution process for the tester to use as reference when the case test fails.
In summary, the present invention has the following advantages:
1: the use case is automatically executed, the tester does not need to participate in the whole process, and the testing efficiency is very high.
2: the test case is in the csv format, so that a tester does not need programming experience, and the platform is very simple to use.
3: is suitable for regression testing. When the version is updated and tested each time, for example, the function requirements related to the use case are not changed, the use case does not need to be changed, and the test can be automatically run directly.
4: the condition of making mistakes due to artificial subjective judgment can be avoided.
5: some cases which cannot be executed or are difficult to execute manually due to high time requirements and the like can be tested.
It should be understood by those skilled in the art that the above embodiments are only for illustrating the present invention and are not to be used as a limitation of the present invention, and that changes and modifications to the above described embodiments are within the scope of the claims of the present invention as long as they are within the spirit and scope of the present invention.

Claims (5)

1. An automatic testing method for a container terminal shore bridge management system is characterized by comprising the following steps:
initializing a test environment;
acquiring a path of a test case, reading, analyzing and storing the test case, wherein the test case comprises task information, test time, test action and an expected result;
writing the task information into a database;
reading state information of shore bridge simulation equipment in OPC and state information of tasks in a database at a certain frequency, and generating event information when monitoring that a test moment occurs;
reading the event information and carrying out corresponding test actions;
acquiring the final states of tasks and equipment;
a test report is generated and the test report is generated,
wherein initializing the test environment comprises:
setting a tested object, wherein the tested object comprises a container terminal shore bridge management system;
configuring a configuration file of a test platform, wherein the configuration file comprises test environment information;
and reading OPC and database information from the configuration file, and establishing communication connection among the container terminal shore bridge management system, the OPC, the database and the shore bridge equipment simulator.
2. An automated testing system for a container terminal quay crane management system, comprising:
the system comprises an automatic test platform, test cases, a database, OPC, shore bridge simulation equipment and a container wharf shore bridge management system;
the automatic test platform comprises a case information reading module, a case information processing module and a task state monitoring module;
the automatic test platform acquires a path of a test case, reads, analyzes and stores the test case by using a case information reading module, wherein the test case comprises task information, test time, test action and an expected result;
the case information processing module writes the task information into a database and transmits the test time information to the task state monitoring module;
the task state monitoring module reads state information of shore bridge simulation equipment in OPC and state information of tasks in a database at a certain frequency, and generates event information and transmits the event information to the case information processing module when monitoring that a test moment occurs;
the case information processing module reads the event information and carries out corresponding test actions;
and the monitoring module acquires the final states of the tasks and the equipment and transmits the final states to the use case information processing module.
3. The automated test system for a container terminal quay crane management system of claim 2, wherein:
the automatic test platform also comprises a test report generating module;
the use case information processing module transmits the actual states of the tasks and the equipment and expected result information in the test use case to the test report generating module;
the test report generation module generates a test report.
4. The automated test system for a container terminal quay crane management system of claim 2, wherein:
the test time refers to a certain specific state of the task or the equipment; the test action refers to the corresponding action to be performed when the test moment occurs.
5. The automated test system for a container terminal quay crane management system of claim 3, wherein:
the test report comprises the test result of the test case and the output information of the task in the execution process.
CN201710616094.9A 2017-07-26 2017-07-26 Automatic testing method and system for container terminal shore bridge management system Active CN107451053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710616094.9A CN107451053B (en) 2017-07-26 2017-07-26 Automatic testing method and system for container terminal shore bridge management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710616094.9A CN107451053B (en) 2017-07-26 2017-07-26 Automatic testing method and system for container terminal shore bridge management system

Publications (2)

Publication Number Publication Date
CN107451053A CN107451053A (en) 2017-12-08
CN107451053B true CN107451053B (en) 2019-12-27

Family

ID=60487585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710616094.9A Active CN107451053B (en) 2017-07-26 2017-07-26 Automatic testing method and system for container terminal shore bridge management system

Country Status (1)

Country Link
CN (1) CN107451053B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101850934A (en) * 2010-05-31 2010-10-06 大连美恒时代科技有限公司 Information management system of crane
CN104932405A (en) * 2015-05-26 2015-09-23 宝鸡石油机械有限责任公司 Method for auxiliary test of PLC control program by employing equipment virtual prototype
CN106940561A (en) * 2017-02-20 2017-07-11 上海大学 A kind of container handling Mobile Robot Control System and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8032234B2 (en) * 2006-05-16 2011-10-04 Rosemount Inc. Diagnostics in process control and monitoring systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101850934A (en) * 2010-05-31 2010-10-06 大连美恒时代科技有限公司 Information management system of crane
CN104932405A (en) * 2015-05-26 2015-09-23 宝鸡石油机械有限责任公司 Method for auxiliary test of PLC control program by employing equipment virtual prototype
CN106940561A (en) * 2017-02-20 2017-07-11 上海大学 A kind of container handling Mobile Robot Control System and method

Also Published As

Publication number Publication date
CN107451053A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
CN108431705B (en) Configuration in a process plant using I/O abstracted field device configuration
US7543276B2 (en) System and method for testing and/or debugging runtime systems for solving MES (manufacturing execution system) problems
DE102018124411A1 (en) I / O VIRTUALIZATION FOR COMMISSIONING
CN107943008B (en) Automated diagnosis test method based on VT system
CN109976779B (en) Robot software online upgrade release method, device, equipment and storage medium
Hegny et al. IEC 61499 based simulation framework for model-driven production systems development
Martins et al. Shop floor virtualization and industry 4.0
EP3121666A1 (en) Modular test platform
CN106068480A (en) Programmable logic controller and apparatus control method based on programmable logic controller
CN106527401B (en) Automatic test system for flight control test
CN103455024B (en) ECU tests system and method
Valente et al. An approach to design and develop reconfigurable control software for highly automated production systems
CN113260935A (en) Method and device for computer-aided simulation of a modular technical system
Martins et al. Supporting the design, commissioning and supervision of smart factory components through their digital twin
CN110596500A (en) Intelligent test management platform and management method for relay protection device and electronic equipment
CN107451053B (en) Automatic testing method and system for container terminal shore bridge management system
CN113341767A (en) Method, system and computer readable storage medium for automated testing
CN114578786A (en) Vehicle test system
CN110674573A (en) Method, device and storage medium for simulating hardware work in MES system
CN110187200A (en) Mechatronic Systems test device
KR20130044700A (en) Simulator system for power plant
CN105676785B (en) Semiconductor processing equipment simulation system and its method of work
Himmler Openness requirements for next generation hardware-in-the-loop testing systems
CN110765655B (en) Dispatching automation simulation system and construction method and device of SCADA model thereof
Isaeva et al. Implementation of Digital Twins for the Analysis of Test Programs of Technical Systems

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