CN105117338A - Selenium-based automatic testing method - Google Patents

Selenium-based automatic testing method Download PDF

Info

Publication number
CN105117338A
CN105117338A CN201510534261.6A CN201510534261A CN105117338A CN 105117338 A CN105117338 A CN 105117338A CN 201510534261 A CN201510534261 A CN 201510534261A CN 105117338 A CN105117338 A CN 105117338A
Authority
CN
China
Prior art keywords
test
selenium
engineer
performance element
test case
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
CN201510534261.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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201510534261.6A priority Critical patent/CN105117338A/en
Publication of CN105117338A publication Critical patent/CN105117338A/en
Pending legal-status Critical Current

Links

Abstract

The present invention discloses a selenium-based automatic testing method, and belongs to the field of computer software automatic testing. The problem to be solved by the invention is that only basic operation can be performed on a webpage space when selenium software is adopted for automatic testing. The automatic testing method comprises the steps of: 1) decomposing a test case into small execution units; 2) setting a parameter for each small execution unit; 3) combining the small execution units based on a function; 5) writing a script; and 5) performing a test by calling a test case. According to the method, a test engineer A designs the test case according to automatic test steps, a test engineer B calls the test case written by the test engineer A, and test cases of regular flow and exception flow are formed through whether input parameters are correct or not. The method avoids the situation that the test engineer repeatedly designs a test version, thereby improving test efficiency.

Description

A kind of automated testing method based on selenium
Technical field
The present invention relates to computer software automatic test field, specifically a kind of automated testing method based on selenium.
Background technology
In the performance history of complex software especially tool-class software and system class software, for test link, both needed the quantity ensureing abundant tester, needed again each version of test again and again simultaneously.So will increase more cost of development, and tester constantly does the work repeated, efficiency is well imagined certainly can not be very high.Such automatic test just in time can address these problems, and in numerous automated test tool, this method selects the English full name of selenium(to be Selenium), an instrument for web application test.Selenium test run directly in browser, just as real user operation.The browser supported comprises IE (7,8,9), MozillaFirefox, MozillaSuite etc., extensively like by automatic test person because it is flexible, simple, be easy to maintenance, but because it is just for the operation of the basic control of webpage, so need when concrete test to do some packagings for concrete test event.
summary of the invention
Technical assignment of the present invention is for above deficiency, provides a kind of automated testing method based on selenium, solves the problem can only carrying out basic operation when adopting selenium software automated testing to page space.
The technical solution adopted for the present invention to solve the technical problems is:
Based on an automated testing method of selenium, utilize testing tool selenium, operation steps is:
1) test case is decomposed into little performance element;
2) be each little performance element parameters;
3) little performance element is combined by function;
4) compile script.
5) call test case to test.
Further, automatic test realizes step 1 by Test Engineer A), step 2), step 3), step 4), Test Engineer B calls the test case of writing of Test Engineer A, by correctness composition normal stream and the exception stream test case of input parameter.
A kind of automated testing method based on selenium of the present invention compared to the prior art, there is following beneficial effect: Test Engineer A design test case of the present invention, Test Engineer B calls the test case of writing of Test Engineer A, by correctness composition normal stream and the exception stream test case of input parameter, overcome the shortcoming just for the operation of the basic control of webpage in selenium, there is good test effect, and avoid design iterations beta version, improve the efficiency of Test Engineer.
Accompanying drawing explanation
Fig. 1 is the structured flowchart of a kind of PCIE device expansion framework;
Fig. 2 is the concrete enforcement block diagram of a kind of PCIE device expansion framework.
Embodiment
Below in conjunction with drawings and Examples, the invention will be further described.
Embodiment 1
Based on an automated testing method of selenium, utilize testing tool selenium, operation steps is:
1) test case is decomposed into little performance element;
2) be each little performance element parameters;
3) little performance element is combined by function;
4) compile script.
Further, automatic test realizes step 1 by Test Engineer A), step 2), step 3), step 4), Test Engineer B calls the test case of writing of Test Engineer A, by correctness composition normal stream and the exception stream test case of input parameter.
The step of the automatic test logged in is:
1) test case is split as three little performance elements by Test Engineer A, is respectively and inputs user name performance element, input password performance element, clicks Button Login performance element;
2) Test Engineer A arranges the parameter inputting user name performance element, input password performance element;
3) Test Engineer A combines according to the function of little performance element, forms new test case;
4) Test Engineer A writes the script of new test case;
5) Test Engineer B calls three interface group that Test Engineer A writes and synthesizes the test case logged in, by correctness composition normal stream and the exception stream test case of input parameter.
Embodiment 2
The step of the automatic test of newly-built user is:
1) test case is split as little performance element by Test Engineer A, is respectively and clicks the little performance element of new buttons, inputs the little performance element of user name, inputs the little performance element of password, again inputs the little performance element of password, the little performance element of input user profile, clicks the little performance element of confirming button;
2) Test Engineer A arranges respectively and clicks new buttons little performance element, inputs the little performance element of user name, the little performance element of input password, again inputs the little performance element of password, the little performance element of input user profile, clicks the parameter of the little performance element of confirming button;
3) Test Engineer A will hit the little performance element of new buttons, input the little performance element of user name, and the little performance element of input password, again input the little performance element of password, the little performance element of input user profile, clicks the little performance element of confirming button and combine;
4) Test Engineer A compile script;
5) Test Engineer B calls the interface that Test Engineer A writes, and is combined as the test case of newly-built user, by state modulator composition normal stream and exception stream test case.
Above-mentioned embodiment is only concrete case of the present invention; scope of patent protection of the present invention includes but not limited to above-mentioned embodiment; any claims according to the invention and any person of an ordinary skill in the technical field to its suitable change done or replacement, all should fall into scope of patent protection of the present invention.
Except the technical characteristic described in instructions, be the known technology of those skilled in the art.

Claims (2)

1., based on an automated testing method of selenium, it is characterized in that utilizing testing tool selenium, operation steps is:
1) test case is decomposed into little performance element;
2) be each little performance element parameters;
3) little performance element is combined by function;
4) compile script;
5) call test case to test.
2. a kind of automated testing method based on selenium according to claim 1, it is characterized in that Test Engineer A realizes step 1), step 2), step 3), step 4), Test Engineer B calls the test case of writing of Test Engineer A, by correctness composition normal stream and the exception stream test case of input parameter.
CN201510534261.6A 2015-08-27 2015-08-27 Selenium-based automatic testing method Pending CN105117338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510534261.6A CN105117338A (en) 2015-08-27 2015-08-27 Selenium-based automatic testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510534261.6A CN105117338A (en) 2015-08-27 2015-08-27 Selenium-based automatic testing method

Publications (1)

Publication Number Publication Date
CN105117338A true CN105117338A (en) 2015-12-02

Family

ID=54665336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510534261.6A Pending CN105117338A (en) 2015-08-27 2015-08-27 Selenium-based automatic testing method

Country Status (1)

Country Link
CN (1) CN105117338A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809068A (en) * 2015-05-08 2015-07-29 浪潮电子信息产业股份有限公司 Web automatic testing framework construction method based on selenium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809068A (en) * 2015-05-08 2015-07-29 浪潮电子信息产业股份有限公司 Web automatic testing framework construction method based on selenium

Similar Documents

Publication Publication Date Title
US10482001B2 (en) Automated dynamic test case generation
CN104899027A (en) Universal form verification method for js
CN111427803B (en) Automated random test method, apparatus, computer device and medium
CN101261600B (en) Software test apparatus and test software design method
CN105912473A (en) BDD-based mobile APP automatic testing platform and testing method
CN102968371B (en) The method of test JAVA API unit component and device
CN108388740A (en) Method for analyzing reliability of bypass redundancy system based on fault tree
CN105786695A (en) Data test method and system
He et al. Modelling infant failure rate of electromechanical products with multilayered quality variations from manufacturing process
CN103150441A (en) Software and hardware synergic simulation verification platform and construction method thereof
CN103729293A (en) GUI testing method based on UML activity diagrams
CN110502434A (en) A kind of automatic test approach and device
TW201506786A (en) System and method for debugging procedure
CN105117338A (en) Selenium-based automatic testing method
US10579761B1 (en) Method and system for reconstructing a graph presentation of a previously executed verification test
CN105243020A (en) Automatic test method applicable for global distributed real-time database
CN102306109A (en) Method for realizing logic programming in communication management machine
CN101876936A (en) Service test method
Elks et al. Application of a fault injection based dependability assessment process to a commercial safety critical nuclear reactor protection system
CN103559134A (en) Configuration method and device for benchmark test component
Frey et al. “Safety automata”—A new specification language for the development of PLC safety applications
CN102567187B (en) A kind of method utilizing C++test to perform SCADE tested object
CN102445644A (en) SPICE (Simulation Program with Integrated Circuit Emphasis) testing structure of MOS (Metal Oxide Semiconductor) device
CN105376117A (en) FC switch chip data monitoring test method
CN105512025A (en) Fuzz engine optimizing method and system based on simulation message

Legal Events

Date Code Title Description
C06 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

Application publication date: 20151202

RJ01 Rejection of invention patent application after publication