CN109032939A - A kind of automated testing method of the server B MC WEB switching on and shutting down operation based on JAVA - Google Patents
A kind of automated testing method of the server B MC WEB switching on and shutting down operation based on JAVA Download PDFInfo
- Publication number
- CN109032939A CN109032939A CN201810789377.8A CN201810789377A CN109032939A CN 109032939 A CN109032939 A CN 109032939A CN 201810789377 A CN201810789377 A CN 201810789377A CN 109032939 A CN109032939 A CN 109032939A
- Authority
- CN
- China
- Prior art keywords
- server
- web
- shutting down
- java
- down operation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Abstract
The automated testing method for the server B MC WEB switching on and shutting down operation based on JAVA that the present disclosure provides a kind of, it using Webdriver, is positioned using page elements, realizes BMC in the automatic test of WEB page, database preparation in test process, exports result automatically.Test method is easy, and test process result whole process is shown, the page is made to become being automatically brought into operation from traditional manual operation.Test process and result can show in real time, and log is saved in the form of TXT.The present invention can automatically test BMC WEB page server switching on and shutting down, improve testing efficiency, save human resources, guarantee product quality.
Description
Technical field
The present invention relates to computer system velocity measuring technique field, more particularly to a kind of server based on JAVA
The automated testing method of BMC WEB switching on and shutting down operation.
Background technique
With the fast development of server industries, more and more clients start to be partial to buy large batch of server work
For the core application of oneself.So to the stability of server, higher requirements are also raised, and can server keep normal
Operating, have become Client application can stable operation premise.
BMC:Baseboard Management Controller, plays an important role in server monitoring management,
It is a special service processor, it monitors a computer using sensor, network server or other are hard
The state of part driving equipment, and communicated by independent connection line and system manager.
In order to guarantee the stable operation of server, need to carry out server B MC switching on and shutting down test.Traditional server B MC
Switching on and shutting down test carries out the test of manual switch machine generally by WEB administration interface, whole when needing tester's manual test
Tracking, by manually being judged, test is extremely taken time and effort, and whole process does not have log as record, and subsequent discs is more tired
It is difficult.
Summary of the invention
In view of the above problems, the purpose of the present invention is to provide a kind of, the server B MC WEB switching on and shutting down based on JAVA are grasped
The automated testing method of work, using JAVA plug-in unit carry out page elements positioning, realize BMC WEB page automatic test,
Database preparation in test process, exports result automatically.
The present invention to achieve the above object, is achieved through the following technical solutions: a kind of server B MC WEB based on JAVA
The automated testing method of switching on and shutting down operation, includes the following steps:
Step 1: introducing selenium plug-in unit, element on WEB is controlled;
Step 2: by webdriver, automatically opening webpage;
Step 3: element being positioned by the findElement method in selenium, control WEB carries out page jump;
Step 4: being shut down by findElement method automatic forced;
Step 5: server is restarted automatically by findElement method;
Step 6: server is started by findElement method automatic cycle;
Step 7: by IPMI order, checking server on-off state, verify the switching on and shutting down operation of WEB page;
Step 8: by checking log, verifying the switching on and shutting down operation of WEB page;
Step 9: outputing test result.
Further, the step 2 further include: by webdriver, the browser of webpage is opened in selection.
Further, the browser includes: chrome and/or firefox.
Further, the step 3 specifically: element is positioned by the findElement method in selenium,
Control button click, text input and the page jump movement on WEB.
Further, the step 4 specifically: server power-off button, starting service are found by findElement method
Device, and the prompt for clicking button is exported, automatic forced shutdown.
Further, the step 5 specifically: Server Restart button, starting service are found by findElement method
Device, and the prompt for clicking button is exported, it is restarted automatically server.
Further, the step 6 specifically: server loop start button is found by findElement method, is started
Server, and the prompt for clicking button is exported, automatic cycle starts server.
Further, the step 7 further include:
Step 71: one .bat file of creation;
Step 72: .bat file is written into IPMI order;
Step 73: executing the .bat file of creation;
Step 74: abnormal printing.
Further, the step 8 further include:
Step 81: entering system log interface;
Step 82: being positioned according to journal elements, obtain log content.
The prior art is compared, the beneficial effects of the invention are that: a kind of server B MC based on JAVA proposed by the present invention
The automated testing method of WEB switching on and shutting down operation is that main script development language utilizes page using Webdriver with JAVA
Surface element positioning realizes BMC database preparation in the automatic test of WEB page, test process, exports result automatically.
This script is automatic test script, and test method is easy, and test process result whole process is shown, makes the page by traditional manual behaviour
Work becomes being automatically brought into operation.Script inputs java-jar script name+ginseng in use, using java virtual operation tool at CMD
Number, Run Script.Show when test process and fructufy, and saves log in the form of TXT.The present invention can be automatically to BMC
WEB page server switching on and shutting down are tested, and testing efficiency is improved, and save human resources, guarantee product quality.
The present invention is based on JAVA, are common to the system environments of various mainstreams, are widely used;System environments needed for test is steady
Fixed, test result is true and reliable.
It can be seen that compared with prior art, the present invention implementing with substantive distinguishing features outstanding and significant progress
Beneficial effect be also obvious.
Detailed description of the invention
Attached drawing 1 is flow chart of the method for the present invention.
Specific embodiment
It explains with reference to the accompanying drawing to a specific embodiment of the invention.
A kind of automated testing method of server B MC WEB switching on and shutting down operation based on JAVA as shown in Figure 1, including
Following steps:
Step 1: introducing selenium plug-in unit, element on WEB is controlled.
Step 2: by webdriver, automatically opening webpage.
Step 3: element being positioned by the findElement method in selenium, control WEB carries out page jump
Turn.
Step 4: being shut down by findElement method automatic forced.
Step 5: server is restarted automatically by findElement method.
Step 6: server is started by findElement method automatic cycle.
Step 7: by IPMI order, checking server on-off state, verify the switching on and shutting down operation of WEB page.
Step 8: by checking log, verifying the switching on and shutting down operation of WEB page.
Step 9: outputing test result.
Based on the automated testing method of the above-mentioned server B MC WEB switching on and shutting down operation based on JAVA, specifically
Program implement and content it is as follows:
1. introducing plug-in unit
// method, predominantly selenium required for program are introduced, element on web is controlled
import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.NoAlertPresentException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
2.WEB is called
3. page jump
4. server starting-up method
5. server shuts down
6. Server Restart
7. server loop start is tested
8. server state inspection
9. log judges
10. result exports
With reference to the drawings and specific embodiments, the invention will be further described.It should be understood that these embodiments are merely to illustrate
The present invention rather than limit the scope of the invention.In addition, it should also be understood that, after reading the content taught by the present invention, this field
Technical staff can make various changes or modifications the present invention, and such equivalent forms equally fall within range defined herein.
Claims (9)
1. a kind of automated testing method of the server B MC WEB switching on and shutting down operation based on JAVA, which is characterized in that including such as
Lower step:
Step 1: introducing selenium plug-in unit, element on WEB is controlled;
Step 2: by webdriver, automatically opening webpage;
Step 3: element being positioned by the findElement method in selenium, control WEB carries out page jump;
Step 4: being shut down by findElement method automatic forced;
Step 5: server is restarted automatically by findElement method;
Step 6: server is started by findElement method automatic cycle;
Step 7: by IPMI order, checking server on-off state, verify the switching on and shutting down operation of WEB page;
Step 8: by checking log, verifying the switching on and shutting down operation of WEB page;
Step 9: outputing test result.
2. the automated testing method of the server B MC WEB switching on and shutting down operation according to claim 1 based on JAVA,
It is characterized in that, the step 2 further include: by webdriver, the browser of webpage is opened in selection.
3. the automated testing method of the server B MC WEB switching on and shutting down operation according to claim 2 based on JAVA,
It is characterized in that, the browser includes: chrome and/or firefox.
4. the automated testing method of the server B MC WEB switching on and shutting down operation according to claim 1 based on JAVA,
It is characterized in that, the step 3 specifically: element is positioned by the findElement method in selenium, is controlled
Button on WEB is clicked, text input and page jump act.
5. the automated testing method of the server B MC WEB switching on and shutting down operation according to claim 1 based on JAVA,
It is characterized in that, the step 4 specifically: server power-off button is found by findElement method, starts server, and
The prompt of button, automatic forced shutdown are clicked in output.
6. the automated testing method of the server B MC WEB switching on and shutting down operation according to claim 1 based on JAVA,
It is characterized in that, the step 5 specifically: Server Restart button is found by findElement method, starts server, and
The prompt of button is clicked in output, is restarted automatically server.
7. the automated testing method of the server B MC WEB switching on and shutting down operation according to claim 1 based on JAVA,
It is characterized in that, the step 6 specifically: server loop start button, starting service are found by findElement method
Device, and the prompt for clicking button is exported, automatic cycle starts server.
8. the automated testing method of the server B MC WEB switching on and shutting down operation according to claim 1 based on JAVA,
It is characterized in that, the step 7 further include:
Step 71: one .bat file of creation;
Step 72: .bat file is written into IPMI order;
Step 73: executing the .bat file of creation;
Step 74: abnormal printing.
9. the automated testing method of the server B MC WEB switching on and shutting down operation according to claim 1 based on JAVA,
It is characterized in that, the step 8 further include:
Step 81: entering system log interface;
Step 82: being positioned according to journal elements, obtain log content.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810789377.8A CN109032939A (en) | 2018-07-18 | 2018-07-18 | A kind of automated testing method of the server B MC WEB switching on and shutting down operation based on JAVA |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810789377.8A CN109032939A (en) | 2018-07-18 | 2018-07-18 | A kind of automated testing method of the server B MC WEB switching on and shutting down operation based on JAVA |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109032939A true CN109032939A (en) | 2018-12-18 |
Family
ID=64643865
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810789377.8A Pending CN109032939A (en) | 2018-07-18 | 2018-07-18 | A kind of automated testing method of the server B MC WEB switching on and shutting down operation based on JAVA |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109032939A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103377115A (en) * | 2012-04-23 | 2013-10-30 | 鸿富锦精密工业(深圳)有限公司 | System event log management system and system event log management method |
US20140181629A1 (en) * | 2012-12-21 | 2014-06-26 | International Business Machines Corporation | Automated screen captures |
CN106201799A (en) * | 2016-07-14 | 2016-12-07 | 浪潮电子信息产业股份有限公司 | A kind of service based on ipmi carries out, to server, the method for testing that DC is restarted |
CN108205485A (en) * | 2018-01-31 | 2018-06-26 | 环旭电子股份有限公司 | The method and system of the automatic test switching on and shutting down in distal end |
-
2018
- 2018-07-18 CN CN201810789377.8A patent/CN109032939A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103377115A (en) * | 2012-04-23 | 2013-10-30 | 鸿富锦精密工业(深圳)有限公司 | System event log management system and system event log management method |
US20140181629A1 (en) * | 2012-12-21 | 2014-06-26 | International Business Machines Corporation | Automated screen captures |
CN106201799A (en) * | 2016-07-14 | 2016-12-07 | 浪潮电子信息产业股份有限公司 | A kind of service based on ipmi carries out, to server, the method for testing that DC is restarted |
CN108205485A (en) * | 2018-01-31 | 2018-06-26 | 环旭电子股份有限公司 | The method and system of the automatic test switching on and shutting down in distal end |
Non-Patent Citations (1)
Title |
---|
肖哥哥: "selenium-java web自动化测试工具", 《HTTPS://WWW.CNBLOGS.COM/XIAOCHANGWEI/P/8405591.HTML》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Palomba et al. | On the impact of code smells on the energy consumption of mobile applications | |
US20210049092A1 (en) | Analyzing software test failures using natural language processing and machine learning | |
CN104375910A (en) | Automated startup and shutdown testing method | |
US7035766B1 (en) | System and method for diagnosing computer system operational behavior | |
CN104391780A (en) | Method for automatically testing stability of redundancy function of power supply of server | |
CN104572422A (en) | Memory monitoring achievement method based on startup and shutdown of Linux system | |
CN104932974B (en) | A kind of script conversion method and device | |
CN110750458A (en) | Big data platform testing method and device, readable storage medium and electronic equipment | |
CN105068900A (en) | Test method for remote control server cold reboot | |
CN103984634A (en) | Memory unsteady state pressure test method of LINUX server | |
Liu | Research of performance test technology for big data applications | |
CN105512000A (en) | Method and device for collecting abnormal information of operating system, and computer | |
CN111176736A (en) | Server mainboard power-on and power-off test method and system | |
CN109032939A (en) | A kind of automated testing method of the server B MC WEB switching on and shutting down operation based on JAVA | |
CN106649005A (en) | Automatic pressure testing method of memory ras (Reliability, Availability and Serviceability) characteristics on the basis of shell | |
CN111679955B (en) | Monitoring diagnosis and snapshot analysis system for application server | |
CN106354599A (en) | Automatic restart testing method used for server of Solaris 11 series | |
CN105426304B (en) | A kind of control method and device for restarting test | |
CN108845909A (en) | A kind of BMC method for testing pressure parallel based on Python | |
CN111367737A (en) | Method and device for optimizing memory performance test | |
Steinle et al. | Mapping moving landscapes by mining mountains of logs: novel techniques for dependency model generation | |
CN111338890A (en) | Method, device and equipment for detecting abnormity of storage equipment and storage medium | |
CN100468354C (en) | Method and system for judging breakdown of computer according to input/output signal and restarting | |
CN109508269A (en) | Test method and system are restarted under a kind of windows system | |
CN109167676A (en) | A kind of diagnostic method and system of High-Performance Computing Cluster failure |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181218 |