CN106547689B - A kind of automatic test cases development system and method based on web - Google Patents
A kind of automatic test cases development system and method based on web Download PDFInfo
- Publication number
- CN106547689B CN106547689B CN201610914969.9A CN201610914969A CN106547689B CN 106547689 B CN106547689 B CN 106547689B CN 201610914969 A CN201610914969 A CN 201610914969A CN 106547689 B CN106547689 B CN 106547689B
- Authority
- CN
- China
- Prior art keywords
- test
- script
- case
- page
- 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.)
- Active
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
-
- 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/3696—Methods or tools to render software testable
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)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
The present invention relates to a kind of automatic test cases development system and method based on web, it encapsulates the web automatic test cases developing instrument for being integrated with independent research, automatic test cases execute tool, automatic test management end and other third party's tools, the professional knowledges such as the exploitation programming for keeping tester deeper without learning and mastering, also web automatic test cases can quickly and easily be developed and execute automatic test, and the tool is suitably applied any kind of web application system and carries out automatic test.
Description
Technical field
The present invention relates to a kind of web automatic test development system and methods, can automatically generate automatic test code,
Cross-platform execution is tested and automatically generates test report in the form of test use cases.
Background technique
From the point of view of the search result to China and foreign countries' patent and non-patent literature, web automatic test master currently on the market
If being based on third party's tool or commercial tool: third party's tool is that debugging test script is developed by the way of recording and playback,
Such test script stability is very poor, and the personnel for needing programming grounding in basic skills debug modification script and can be only achieved the mesh of stable operation
, maintenance difficulties are big, at high cost;The scalability of commercial tool is poor, and cross-platform ability is limited, and script development scheme is equally adopted
With the mode of recording, script stability is poor, and is difficult to the web automation survey built web automated test frame, form system
Examination.
Summary of the invention
The technology of the present invention solves the problems, such as: in order to overcome the stability of third party's automated test tool it is poor, it is not convenient for safeguarding, effect
The low defect of rate provides a kind of web automatic test cases development system, can automatically generate automatic test cases, automatically
Implementation of test cases, and visualized management can be realized by operation automation test and management end, it can be in unmanned value
In the case where keeping, test environmental preparation is completed, test case distributes deployment, test result collects and shows test report.Test
Script is easy to maintain, while improving web automatic test execution efficiency, reduces project risk and entreprise cost.
The technical scheme is that a kind of automatic test cases development system based on web, comprising: hypertext mark
Remember language parser Jsoup html, web application driving Selenium WebDriver, test frame TestNG, test
Use-case developing instrument, test case execute tool, screen scraping tool Screencapture, report generation tool ReportNG,
Database and automatic test management end, in which:
Hypertext markup language resolver Jsoup html, is the html parser of a Java, directly parses some URL
Address, html text content;Jsoup parsing HTML obtain a Document object, by operate Document attribute come
Html page content is obtained, takes out data by DOM, CSS and similar to the operating method of jQuery, and by html page
Content and data are supplied to test case developing instrument;
Web application drives Selenium WebDriver, is to provide the API of a set of object-oriented, local or remote
Browser, some functions of analog manual operation's browser, including mouse are driven on journey computer using a variety of scripting languages
It clicks, double-click, pulling, file uploads, file download, the carriage return of keyboard, rollback, space, ctrl, alt and shift;Pass through institute
It states feature operation and is converted to computer-readable operation code and be supplied to test case developing instrument;
TestNG is Testing Next Generation next generation's measuring technology, is according to JUnit and NUnit thought
And construct using annotation come the test frame of accelerated test function, both can also be used to do and collected for doing unit testing
At test;Sequence is executed according to annotation decision code, the test case to be executed is controlled by testng.xml file
Granularity, i.e. test bag, test class and test method provide framework services for test case developing instrument;
Test case developing instrument positions tool location element in the position of the page by the element of independent development, calls
Jsoup html obtains the content of page elements, calls Selenium WebDriver driving browser and obtains operation browser
Movement, the code of single automatic test cases is generated by script generator and is stored in local engineering, after the completion of debugging on
It reaches in database;
Test case executes tool, and the test script that test case is concentrated is compiled into executable class text by JDK
Class file is loaded into virtual machine JVM using self defined class loader by part, and instantiation executes object and injects environmental variance,
The connection session with tested script is established, is associated with by the session of foundation with the generation of tested script, test case executes
Tool is by creation session debugging and executes test script;Entire test is executed under TestNG frame, can both be led to
The execution sequence and executive mode for crossing specific method in annotation control test code, can also be by configuring TestNG's
Test.xml configuration file calls test report to give birth to control the sequence that executes of test case after the completion of test use cases execution
The test report of user-defined format is exported at tool ReportNG and is stored on test report server, if there is executing failure
Test case, failure information can be also printed upon in test report, while screen scraping tool Screencapture being called to exist
It executes the page screenshotss of failure and is printed upon in test report, facilitate analyzing and positioning questions and prospect;
Screen scraping tool Screencapture provides the screen scraping i.e. operation of screenshotss, when test case executes tool
When failure or exception occurs in implementation of test cases collection, test case, which executes tool, can call it to carry out screenshotss to fail
Or abnormal page print is in test report;
Test report Core Generator ReportNG generates automatic test report, executes tool according to test case and provides
Test result and shot image information, generate the test report of user-defined format;
Database, the data that storage and management web automatic test cases development system generates, including test case exploitation
Page elements, test data and the test script that tool uploads, automatic test management end is in administration page element, test data
With update when test script, automatic test management end creation test use cases, test execution server relevant information,
The implementing result of test case execution tool implementation of test cases collection;
Automatic test management end is integrated with the editor of page elements and checks, addition, editor, the deletion of test data
With check, test script is checked, the editor of test case and is checked, the addition of test use cases, is deleted and checked at editor,
Inquiry, deletion and the refreshing of test execution, testing service device increase, edit, delete and check that totally seven function pages, real newly
The management of collection page elements, test data management, test script management, test case management, test use cases management, test are showed
Execute the visualized management of management and test report management one.Automatic test management end read test from database is used
Multiple test cases are combined into a test use cases and issue test assignment, simultaneous selection to test case execution tool by example
The remote testing server of implementation of test cases collection;
It is a kind of that the automatic test cases development approach based on web is carried out using system described in claim 1, realize step
It is rapid as follows:
(1) when opening test case developing instrument, default opens element and grabs CATCH pages, first to the tested page
URL carries out initialization INIT_LIB, by calling WebDriver to open the tested page, pins the ctrl key on keyboard, same to time shift
Mouse is moved to page elements position, at this moment page elements can be surrounded by red boxes, and when clicking left mouse button, test is used
Example developing instrument can call Jsoup to obtain the attribute and attribute value of page elements, and pop up prompting frame and show the page elements
Attribute and attribute value click confirming button, and test case developing instrument, which automatically generates script and pops up prompting frame, shows page member
The positioning method of element and the label where page elements, click while being added to button code, test script is stored in local
In the test class of java engineering, page elements are saved in local Elements.xlsx file;
(2) TEST_DATA pages of test data for opening test case developing instrument is added manually by clicking ADD_NEW
Then the corresponding ID of test data is filled into the VALUE of the test script of step (1) generation, clicks and save by test data
Test data set is saved in local TestData.xlsx file by button;
(3) open SETTINGS pages of setting of test case developing instrument, here can to page elements, test data and
Test script carry out upload and down operation, click all upload, by local Elements.xlsx file page elements,
The test script of test data and local engineering in TestData.xlsx file uploads in database;
(4) page elements, test data and test script are recorded in different tables by database respectively;According to test number
According to+test script formation testing example design theory, after step (3) complete local upload, test case is given birth to automatically
Cheng Liao, and be recorded separately in test case table, which passes through record test data set title, test script title
With test case title, associate test data and test script to form test case;
(5) automatic test management end is the full name visualized management tool of each link of automatic test, can be at nobody
In the case where on duty, test environmental preparation is completed, test case distributes deployment, test report is collected and shown to test result, packet
It includes checking and editing for page elements: illustrating the element of each page, element location code, positioning side according to the division of the page
Formula, localization and expression formula and page-tag, and provide edit-modify function;The addition of test data, is deleted and is checked at editor:
Test data set, test data ID, test data title, test data key and survey are illustrated according to the division of test data set
Data VALUE is tried, and provides additions and deletions and changes Cha Gongneng;Test script is checked: according to the function of tested page different menu
Point divides, and test script is illustrated in a manner of tree structure, foreground is facilitated to check test script;It the editor of test case and looks into
It sees: being divided according to the function point of tested page different menu, test case is illustrated in a manner of tree structure, test is used
Example title, test script title, test use cases title and test script path are modified, be elected in a test case
Afterwards, subpage frame can show the test data of the test case, and provide additions and deletions and change Cha Gongneng;The addition of test use cases is compiled
It collects, delete and check: merging the design concept to form a test use cases according to a plurality of test case, creation test first is used
Example collection, test use cases are made of number, Name and Description, choose newly-built test use cases, can add to test use cases
Add test case, and provide to change the additions and deletions of the test case of addition and look into, test use cases are then added to remote testing
Server executes tool by test case and executes test, can check implementation progress, check implementing result and test after having executed
Report;Inquiry, deletion and the refreshing of test execution: the page function user oriented real-time exhibition implementation progress of test use cases and
As a result, the implementing result of test case and test report can be remotely checked;Testing service device is increased newly, edits, deletes and is looked into
See: function pages are used to manage remote testing server, by checking that the service state of testing service device selects to execute test
Server;
(6) test case executes tool can compile the test script being stored in class automatically, be compiled by JDK
Class file is loaded into virtual machine JVM using self defined class loader, and instantiation executes object and injects environmental variance, establishes
With the connection session of tested script, it is associated with by the session of foundation with the generation of tested script, this session is being recorded
Outside tested script mouse and KeyEvent, it can also be debugged by the generated test script of playback section;When debugging,
Only test need to be executed by manually adjusting tested script, then by session;Entire test is executed under TestNG frame
, the execution sequence and executive mode of specific method in test code can have both been controlled by annotation, can also be passed through and be configured
The test.xml configuration file of TestNG is called and is surveyed after the completion of test use cases execution to control the sequence that executes of test case
The test report of examination report generation tool ReportNG output user-defined format is simultaneously stored on test report server, if there is
Failure information, can also be printed upon in test report, while calling screen scraping tool by the test case for executing failure
Screencapture is executing the page screenshotss of failure and is being printed upon in test report, facilitates analyzing and positioning questions and prospect.
The beneficial effects of the present invention are: the present invention also can easily develop web certainly to the tester of no programming grounding in basic skills
Dynamicization test case and the automatic test for carrying out web page, can visualized operation execute, it is easy to operate, easy to get started, greatly
The exploitation execution efficiency of automatic test cases is improved greatly.
(1) code for having been automatically generated test case using tool due to the invention is not required to the deeper exploitation of to master and compiled
The professional knowledges such as journey, thus it is easy to operate, easy to get started, substantially increase the exploitation execution efficiency of automatic test cases.
(2) since the invention has used test case developing instrument, substep debugging can be carried out to the test script of generation,
Greatly improve the stability of automatic test script.
(3) since the invention has used automatic test management end, visualized pipe is realized to web automatic test
Reason, to test execution server automatic deployment test execution environments, further improves automatic test efficiency.
(4) since the invention has used test case to execute tool, by establishing with the connection session's of tested script
Mode implementation of test cases executes test case more efficient.
(5) present invention has the advantages that the degree of automation is relatively high, reusability is strong, scalability is excellent, can be suitble to
Automatic test is carried out applied to any kind of web application system.
Detailed description of the invention
Fig. 1 is the composition frame diagram of present system;
Fig. 2 is automatic test cases developing instrument realization procedure chart of the invention;
Fig. 3 is automatic test management end realization procedure chart of the invention;
Fig. 4 is that test case of the invention executes tool realization procedure chart.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples.
As shown in fig. 1, the present invention relates to a kind of web automatic test cases development systems by third party's tool, test
Use-case developing instrument, automatic test management end and test case execute tool and constitute.Wherein third party's tool includes hypertext
Markup language interpreter Jsoup html, web application drive Selenium WebDriver, automated test frame
TestNG, test report Core Generator ReportNG and screen scraping tool Screencapture.
It is entire to realize that process is as follows:
(1) when automatic test engineer opens test case developing instrument, default opens element and grabs CATCH pages,
Initialization INIT_LIB is carried out to the URL of the tested page first, by calling WebDriver to open the tested page, pins keyboard
On ctrl key call the element of independent development to position tool, while mobile mouse is to page elements position, at this moment the page
Element can be surrounded by red frame, and automatic test cases developing instrument can call Jsoup to obtain the page while clicking left mouse button
Attribute of an element and attribute value, and attribute and attribute value that prompting frame shows the page elements are popped up, confirming button is clicked, automatically
The script generator for changing test case developing instrument automatically generates script and pops up the positioning method that prompting frame shows page elements
With the label where page elements, clicks while being added to button code, test script is stored in the survey of local java engineering
It tries to be saved in page elements in local Elements.xlsx file in class.
(2) automatic test engineer opens TEST_DATA pages of test data of test case developing instrument, passes through click
ADD_NEW adds test data manually, then the corresponding ID of test data is filled into the test script of step (1) generation
In VALUE, clicks save button and be saved in test data set in local TestData.xlsx file.
(3) automatic test engineer opens SETTINGS pages of setting of test case developing instrument, here can be to page
Surface element, test data and test script carry out upload and down operation, click and all upload, by local Elements.xlsx
The test script of page elements in file, the test data in TestData.xlsx file and local engineering uploads to data
In library.
(4) page elements, test data and test script are recorded in different tables by database respectively;According to test number
According to+test script formation testing example design theory, after step (3) complete local upload, test case is given birth to automatically
Cheng Liao, and be recorded separately in test case table, which is used by record test data set title, test script title and test
Example title, associates test data and test script to form test case.
(5) automatic test management end is the full name visualized management tool of each link of automatic test, can be at nobody
In the case where on duty, test environmental preparation is completed, test case distributes deployment, test result collects and shows test report.Packet
It includes checking and editing for page elements: illustrating the element of each page according to the division of the tested page, element location code, determines
Position mode, localization and expression formula and page-tag, and provide edit-modify function;The addition of test data, is deleted and is looked at editor
See: according to the division of test data set illustrate test data set, test data ID, test data title, test data key and
Test data VALUE, and provide additions and deletions and change Cha Gongneng;Test script is checked: according to the function of tested page different menu
It can put and divide, test script is illustrated in a manner of tree structure, foreground is facilitated to check test script;The editor of test case and
It checks: being divided according to the function point of tested page different menu, test case is illustrated in a manner of tree structure, it can be to survey
On probation example title, test script title, test use cases title and test script path are modified, be elected in a test use
After example, subpage frame can show the test data of the test case, and provide additions and deletions and change Cha Gongneng;The addition of test use cases,
It edits, delete and checks: merging the design concept to form a test use cases according to a plurality of test case, creation test first
Set of uses case, test use cases are made of number, Name and Description, choose newly-built test use cases, can be to test use cases
Test case is added, and provides to change the additions and deletions of the test case of addition and look into, test use cases are then added to long-range survey
It tries server to execute, can check implementation progress, implementing result and test report can be checked after having executed;Test execution is looked into
It askes, delete and refreshes: the implementation progress and result of page function user oriented real-time exhibition test use cases, test case
Implementing result and it can remotely check test report;Testing service device is increased newly, edits, deletes and checked: the function pages are used
Remote testing server is managed, the server for executing test can be selected by checking the service state of testing service device.
(6) test case executes tool can compile the test script being stored in class automatically, be compiled by JDK
Class file is loaded into virtual machine JVM using self defined class loader, and instantiation executes object and injects environmental variance, establishes
With the connection session of tested script, it is associated with by the session of foundation with the generation of tested script.This session is being recorded
Outside tested script mouse and KeyEvent, it can also be debugged by the generated test script of playback section.When debugging,
Only test need to be executed by manually adjusting tested script, then by session.Entire test is executed under TestNG frame
, the execution sequence and executive mode of specific method in test code can have both been controlled by annotation, can also be passed through and be configured
The test.xml configuration file of TestNG executes sequence control test case.After the completion of test use cases execute, calls and survey
The test report of examination report generation tool ReportNG output user-defined format is simultaneously stored on test report server, if there is
Failure information, can also be printed upon in test report, while calling screen scraping tool by the test case for executing failure
Screencapture is executing the page screenshotss of failure and is being printed upon in test report, facilitates analyzing and positioning questions and prospect.
As shown in Figure 2, test case developing instrument realizes that process is as follows:
(1) tool being positioned by the page elements of independent development and navigating to element in the position of the page, the positioning of element is believed
Breath has uniqueness, after the event that listens to and the location information for automatically generating out element by frame, if frame automaticly inspects
The result is that multiple interface elements, by addition self attributes or his father's dvielement attribute, then verified again, repeat this
One process, until acquisition one is most succinct and is unique interface element.
(2) it calls hypertext markup language resolver Jsoup html to grab page elements, calls WebDriver using pass
Key word drive test model records the movement of operation pages, is tested using the annotation structural generation of automated test frame TestNG
Script.
(3) test data is added manually, test data ID is filled into the value of test script, generates test case.
(4) respectively by the storage of page elements, test data, test script and test case into database.
(5) automatic test cases exploitation is completed, and is terminated.
In above-mentioned automatic test cases development process, page elements, test data, test script and test case storage
Attribute information see the table below.
As shown in Figure 3, automatic test management end realizes that process is as follows:
(1) test use cases are created first, then automatic test management end read test script, test from database
Data and test case are added to test case concentration.
(2) test execution server is selected, if the testing service of the test execution server of selection does not start, is mentioned
Show that the testing service of selected test execution server does not start;If the service of the test execution server of selection has been opened
It is dynamic, then start to dispose test execution environments, including updating the page elements file on test execution server
Elements.xlsx, test data file TestData.xlsx, test use cases file TestSuite.xlsx and test system
Unite configuration file SysConfig.xml.
(3) test use cases are handed down to test case as test assignment and execute tool execution.
During above-mentioned test use cases creation, the test case implementing result table of test use cases and test case concentration
Attribute information see the table below.
As shown in Figure 4, test case executes tool and realizes that process is as follows:
(1) test use cases are compiled into executable class file by JDK.
(2) class file is loaded into Java Virtual Machine using self defined class loader, and instantiates and executes object and note
Enter environmental variance, the connection session of creation and tested script.
(3) by session implementation of test cases collection, test case implementing result is firstly generated, if test case is complete
Portion's straight trip passes through, then the implementing result for exporting test use cases is crossed to pass through;If there is the execution of partial test use-case is unsuccessfully or different
Often, then the implementing result of test use cases is exported as failure.
(4) if the implementing result of test use cases is failure, calling screen scraping tool Screencapture first
In the page screenshotss for executing failure, then test report Core Generator ReportNG is called to generate test report, failure will be executed
Page screenshot be printed upon in test report.If the implementing result of test use cases is successfully, to call directly test report
Core Generator ReportNG generates test report.
(5) test report is uploaded in test report server by FTP.
The implementing result of above-mentioned test use cases and test case can update test use cases table respectively
The TS1_STATUS field for the test case implementing result table that attribute_01 field and test case are concentrated.
In short, the invention realizes the automatic test to weblication function, including automatic test cases code
Generation, the filing management of test case, the automated execution of test case, test report the functions such as automatically generate, can be with
Quickly and effectively carry out the Function Test Automation of weblication.In addition, since the invention is tested without manual compiling
Code is not required to the professional knowledges such as the deeper exploitation programming of to master, therefore, easy to operate, easy to get started, substantially increases automation
The execution efficiency of test.The present invention is also equipped with the advantages that the degree of automation is relatively high, reusability is strong, scalability is excellent,
Any kind of web application system can be suitably applied and carry out automatic test.
Non-elaborated part of the present invention belongs to techniques well known.
By description detailed enough, these implement example, so that skilled artisans appreciate that and practicing this hair
It is bright.Without departing from the spirit and scope in the present invention, logic, realization and others can be made to implementation to change
Become.Therefore, following detailed description is not taken in a limiting sense, and the scope of the present invention is only defined solely by the appended claims.
Claims (10)
1. a kind of automatic test cases development system based on web, characterized by comprising: hypertext markup language resolver
Jsoup html, web application driving Selenium WebDriver, test frame TestNG, test case developing instrument,
Test case execute tool, screen scraping tool Screencapture, report generation tool ReportNG, database and from
Dynamicization test and management end, in which:
Hypertext markup language resolver Jsoup html, is the html parser of a Java, with directly parsing some URL
Location, html text content;Jsoup parsing HTML obtains a Document object, is obtained by operating the attribute of Document
Html page content is taken, data are taken out by DOM, CSS and similar to the operating method of jQuery, and will be in html page
Hold and data are supplied to test case developing instrument;
Web application drives Selenium WebDriver, is to provide the API of a set of object-oriented, in Local or Remote meter
Drive browser on calculation machine using a variety of scripting languages, some functions of analog manual operation's browser, including mouse-click,
It double-clicks, pull, file uploads, file download, the carriage return of keyboard, rollback, space, ctrl, alt and shift;Pass through the function
Operation is converted to computer-readable operation code and is supplied to test case developing instrument;
TestNG is Testing Next Generation next generation's measuring technology, is structure according to JUnit and NUnit thought
Build using annotation come the test frame of accelerated test function, for doing unit testing or for doing integration testing;According to annotation
Determine code executes sequence, and the granularity for the test case to be executed, i.e. test bag, survey are controlled by testng.xml file
Class and test method are tried, provides framework services for test case developing instrument;
Test case developing instrument positions tool location element in the position of the page by the element of independent development, calls Jsoup
Html obtains the content of page elements, calls Selenium WebDriver driving browser and obtains the dynamic of operation browser
Make, the code of single automatic test cases is generated by script generator and is stored in local engineering, is uploaded to after the completion of debugging
In database;
Test case executes tool, can compile the test script being stored in class automatically, be concentrated test case by JDK
Test script is compiled into executable class file, and class file is loaded into virtual machine JVM using self defined class loader,
Instantiation executes object and simultaneously injects environmental variance, establishes the connection session with tested script, by the session of foundation with
Tested script generates association, and test case executes tool by creation session debugging and executes test script;Entirely testing is
It is executed under TestNG frame, the execution sequence and executive mode of specific method in test code is controlled by annotation, or logical
The test.xml configuration file of configuration TestNG is crossed to control the sequence that executes of test case, after the completion of test use cases execution,
It calls the test report of test report Core Generator ReportNG output user-defined format and is stored on test report server,
If there is executing the test case of failure, failure information can be also printed upon in test report, while calling screen scraping tool
Screencapture is executing the page screenshotss of failure and is being printed upon in test report, facilitates analyzing and positioning questions and prospect;
Screen scraping tool Screencapture provides the screen scraping i.e. operation of screenshotss, executes when test case executes tool
Test use cases occur failure or it is abnormal when, test case, which executes tool, can call it to carry out screenshotss to occur failing or different
Normal page print is in test report;
Test report Core Generator ReportNG, generates automatic test report, executes the survey that tool provides according to test case
Test result and shot image information generate the test report of user-defined format;
Database, the data that storage and management web automatic test cases development system generates, including test case developing instrument
Page elements, test data and the test script of upload, automatic test management end is in administration page element, test data and survey
The update of this when of training, the relevant information of test use cases, test execution server that automatic test management end creates, test
The implementing result of use-case execution tool implementation of test cases collection;
Automatic test management end is the full name visualized management tool of each link of automatic test, can be unattended
In the case of, complete test environmental preparation, test case distributes deployment, test result collects and shows test report;Automation is surveyed
Examination management end is integrated with the editor of page elements and checks, the addition of test data, is deleted and checked at editor, test script
It checks, the editor of test case and check, the addition of test use cases, is deleted and checked at editor, and the inquiry of test execution is deleted
It removes and refreshes, testing service device is increased newly, edits, deletes and checked, totally seven function pages, realizes collection page elements pipe
Reason, test data management, test script management, test case management, test use cases management, test execution management and test report
Accuse the visualized management of management one, automatic test management end read test use-case from database, by multiple test cases
Be combined into a test use cases and execute tool to test case and issue test assignment, simultaneous selection implementation of test cases collection it is remote
Journey testing service device.
2. a kind of automatic test cases development system based on web according to claim 1, it is characterised in that: described
Realization is checked and edited to page elements are as follows: illustrates the element of each page according to the division of the page, element location code, determines
Position mode, localization and expression formula and page-tag, and provide edit-modify function.
3. a kind of automatic test cases development system based on web according to claim 1, it is characterised in that: described
Realization is deleted and checked to the addition of test data, at editor are as follows: illustrates test data set according to the division of test data set, surveys
Data ID, test data title, test data key and test data VALUE are tried, and provides additions and deletions and changes Cha Gongneng.
4. a kind of automatic test cases development system based on web according to claim 1, it is characterised in that: test
Script checks realization are as follows: divides according to the function point of tested page different menu, survey is illustrated in a manner of tree structure
Training sheet, facilitates foreground to check test script.
5. a kind of automatic test cases development system based on web according to claim 1, it is characterised in that: described
It the editor of test case and checks: dividing according to the function point of tested page different menu, shown in a manner of tree structure
Test case, modifies to test case title, test script title, test use cases title and test script path,
In elected after a test case, subpage frame can show the test data of the test case, and provide additions and deletions and change Cha Gongneng.
6. a kind of automatic test cases development system based on web according to claim 1, it is characterised in that: described
Realization is deleted and checked to the addition of test use cases, at editor are as follows: merges to form a test use cases according to a plurality of test case
Design concept, first creation test use cases, test use cases by number, Name and Description form, choose newly-built test
Set of uses case adds test case to test use cases, and provides to change the additions and deletions of the test case of addition and look into, then will test
Set of uses case is added to remote testing server and executes test by test case execution tool, checks implementation progress, looks into after having executed
See implementing result and test report;Inquiry, deletion and the refreshing of test execution.
7. a kind of automatic test cases development system based on web according to claim 1, it is characterised in that: function
It the implementation progress and result, the implementing result of test case of page user oriented real-time exhibition test use cases and can remotely look into
See test report.
8. a kind of automatic test cases development system based on web according to claim 1, it is characterised in that: test
Server is increased newly, edits, deletes and checked: function pages are used to manage remote testing server, by checking testing service
The service state selection of device executes the server of test.
9. a kind of automatic test cases development system based on web according to claim 1, it is characterised in that: described
Test case executes tool specific implementation are as follows: is compiled into class file by JDK, is loaded into void using self defined class loader
Quasi- machine JVM, instantiation execute object and inject environmental variance, establish the connection session with tested script, pass through foundation
Session is associated with the generation of tested script, this session is being recorded outside tested script mouse and KeyEvent, is also passed through back
The generated test script in part is put to be debugged;It, only need to be by manually adjusting tested script when debugging, then pass through
Session executes test;Entire test is executed under TestNG frame, controls specific side in test code by annotation
The execution sequence and executive mode of method, or the test.xml configuration file by configuring TestNG control the execution of test case
Sequentially, after the completion of test use cases execute, the test report of test report Core Generator ReportNG output user-defined format is called
It accuses and is stored on test report server, if there is executing the test case of failure, failure information can be also printed upon to test
In report, while screen scraping tool Screencapture being called to execute the page screenshotss of failure and be printed upon test report
In, facilitate analyzing and positioning questions and prospect.
10. it is a kind of using claim 1-9 it is one of any described in system carry out the automatic test cases exploitation side based on web
Method, it is characterised in that realize that steps are as follows:
(1) when opening test case developing instrument, default open element grab CATCH pages, first to the URL of the tested page into
Row initialization INIT_LIB pins the ctrl key on keyboard, while mobile mouse by calling WebDriver to open the tested page
Page elements position is marked, at this moment page elements can be surrounded by red boxes, and when clicking left mouse button, test case is opened
Hair tool can call Jsoup to obtain the attribute and attribute value of page elements, and pop up the attribute that prompting frame shows the page elements
And attribute value, confirming button is clicked, test case developing instrument, which automatically generates script and pops up prompting frame, shows page elements
Label where positioning method and page elements is clicked while being added to button code, test script is stored in local java
In the test class of engineering, page elements are saved in local Elements.xlsx file;
(2) TEST_DATA pages of test data for opening test case developing instrument adds test by clicking ADD_NEW manually
Then the corresponding ID of test data is filled into the VALUE of the test script of step (1) generation, clicks save button by data
Test data set is saved in local TestData.xlsx file;
(3) SETTINGS pages of setting for opening test case developing instrument, carries out page elements, test data and test script
Upload and down operation are clicked and are all uploaded, by page elements, the TestData.xlsx in local Elements.xlsx file
The test script of test data and local engineering in file uploads in database;
(4) page elements, test data and test script are recorded in different tables by database respectively;According to test data+
Test script forms testing example design theory, and after step (3) complete local upload, test case has been automatically generated
, and be recorded separately in test case table, the test case table by record test data set title, test script title and
Test case title associates test data and test script to form test case.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610914969.9A CN106547689B (en) | 2016-10-20 | 2016-10-20 | A kind of automatic test cases development system and method based on web |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610914969.9A CN106547689B (en) | 2016-10-20 | 2016-10-20 | A kind of automatic test cases development system and method based on web |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106547689A CN106547689A (en) | 2017-03-29 |
CN106547689B true CN106547689B (en) | 2019-03-01 |
Family
ID=58391958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610914969.9A Active CN106547689B (en) | 2016-10-20 | 2016-10-20 | A kind of automatic test cases development system and method based on web |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106547689B (en) |
Families Citing this family (60)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108733555A (en) * | 2017-04-25 | 2018-11-02 | 中移信息技术有限公司 | A kind of application testing method and device |
CN107145448A (en) * | 2017-05-09 | 2017-09-08 | 携程旅游信息技术(上海)有限公司 | Test middleware, test system and method based on selenium |
CN107133177A (en) * | 2017-05-12 | 2017-09-05 | 郑州云海信息技术有限公司 | A kind of automated test frame |
CN107273287A (en) * | 2017-06-06 | 2017-10-20 | 云南电网有限责任公司信息中心 | A kind of web terminal Function Test Automation framework based on power business case driving |
CN107402882B (en) * | 2017-07-21 | 2020-11-06 | 杭州迪普科技股份有限公司 | Web page testing method and device |
CN107577607B (en) * | 2017-09-07 | 2020-07-21 | 携程旅游信息技术(上海)有限公司 | User interface automatic testing method and device, electronic equipment and storage medium |
CN107656869A (en) * | 2017-09-15 | 2018-02-02 | 国云科技股份有限公司 | A kind of method that exclusive automatic test report is built based on JAVA |
CN107783902A (en) * | 2017-09-26 | 2018-03-09 | 甘肃万维信息技术有限责任公司 | A kind of Selenium automated testing methods and system from coding |
CN107807885B (en) * | 2017-11-08 | 2021-03-30 | 广州酷狗计算机科技有限公司 | Task information display method and device |
CN107766252A (en) * | 2017-11-08 | 2018-03-06 | 平安科技(深圳)有限公司 | Test script automated execution method, apparatus, equipment and storage medium |
CN108255706A (en) * | 2017-11-27 | 2018-07-06 | 平安科技(深圳)有限公司 | Edit methods, device, terminal device and the storage medium of automatic test script |
CN109992496A (en) * | 2017-12-29 | 2019-07-09 | 北京京东尚科信息技术有限公司 | A kind of data processing method and device for automatic test |
CN108228464B (en) * | 2018-01-12 | 2020-12-29 | 浪潮通用软件有限公司 | Mobile application UI (user interface) testing framework based on data driving and implementation method thereof |
CN110245064A (en) * | 2018-03-08 | 2019-09-17 | 北京京东尚科信息技术有限公司 | Object test method and its system, computer system and computer-readable medium |
CN108446230B (en) * | 2018-03-19 | 2021-07-20 | 南京邮电大学 | Webdriver-oriented Java test code quality evaluation method |
CN110347577B (en) * | 2018-04-04 | 2024-04-09 | 阿里巴巴集团控股有限公司 | Page testing method, device and equipment thereof |
CN108845929A (en) * | 2018-05-07 | 2018-11-20 | 北京三快在线科技有限公司 | Page performance test method and apparatus |
CN108647147B (en) * | 2018-05-15 | 2021-06-29 | 南京璇玑信息技术有限公司 | Automatic testing robot implemented by using atlas analysis and use method thereof |
CN108733571B (en) * | 2018-05-28 | 2022-05-31 | 北京五八信息技术有限公司 | Test method, device, equipment and computer readable storage medium |
CN108984390B (en) * | 2018-06-04 | 2022-08-30 | 卡斯柯信号有限公司 | Universal automatic test framework for signal system off-line tool and application thereof |
CN108845940B (en) * | 2018-06-14 | 2021-09-07 | 云南电网有限责任公司信息中心 | Enterprise-level information system automatic function testing method and system |
CN108984405B (en) * | 2018-07-12 | 2022-06-07 | 郑州云海信息技术有限公司 | Performance test method, device and computer readable storage medium |
CN110888794A (en) * | 2018-09-10 | 2020-03-17 | 北京京东尚科信息技术有限公司 | Interface test method and device |
CN109582525B (en) * | 2018-10-19 | 2022-06-03 | 京信网络系统股份有限公司 | Test code verification method, verification device, equipment and storage medium |
CN109582582A (en) * | 2018-12-06 | 2019-04-05 | 亚信科技(中国)有限公司 | A kind of automated testing method and system of web interface |
CN109710528B (en) * | 2018-12-25 | 2022-03-01 | 中国人民财产保险股份有限公司 | Test script generation method, device, equipment and medium |
CN111427760B (en) * | 2019-01-09 | 2024-05-28 | 阿里巴巴集团控股有限公司 | Page test method, device, equipment and storage medium |
CN109960655A (en) * | 2019-03-21 | 2019-07-02 | 杭州迪普科技股份有限公司 | Creation method, device, the electronic equipment of web test frame |
CN111831533B (en) * | 2019-04-15 | 2022-09-27 | 西安邮电大学 | Web application test case generation method based on navigation chart |
CN110287092A (en) * | 2019-05-10 | 2019-09-27 | 广东电力交易中心有限责任公司 | A kind of electricity transaction system and its automatic test approach based on graphical interfaces |
CN110309055A (en) * | 2019-05-23 | 2019-10-08 | 深圳壹账通智能科技有限公司 | Black-box Testing method, apparatus, terminal and storage medium based on Java Virtual Machine |
CN110147327B (en) * | 2019-05-23 | 2023-04-18 | 浙江传媒学院 | Multi-granularity-based web automatic test management method |
CN110321281A (en) * | 2019-05-24 | 2019-10-11 | 中国工程物理研究院计算机应用研究所 | Web test platform and test method based on mixing automated test frame |
CN110209398A (en) * | 2019-06-04 | 2019-09-06 | 浪潮软件集团有限公司 | A kind of method that DevOps carries out continuous integrating service based on agreement |
CN110471833A (en) * | 2019-06-27 | 2019-11-19 | 网宿科技股份有限公司 | A kind of acquisition methods of test data, electronic equipment and storage medium |
CN110618934A (en) * | 2019-08-15 | 2019-12-27 | 重庆金融资产交易所有限责任公司 | Front-end automatic test debugging method and device and computer readable storage medium |
CN110704305A (en) * | 2019-09-07 | 2020-01-17 | 创新奇智(合肥)科技有限公司 | Text-based automatic test case design method and system |
CN110908894B (en) * | 2019-10-11 | 2022-04-05 | 苏宁云计算有限公司 | Visual report tool automatic testing method and device based on vuex |
CN110851356B (en) * | 2019-10-30 | 2022-02-11 | 河海大学 | Selenium-based Web application automatic test framework and construction method and system thereof |
CN111240958A (en) * | 2019-12-04 | 2020-06-05 | 五八同城信息技术有限公司 | Interface testing method and device, electronic equipment and medium |
CN111078553B (en) * | 2019-12-16 | 2021-06-15 | 南方电网数字电网研究院有限公司 | Data development task testing method and device, computer equipment and storage medium |
CN111159028B (en) * | 2019-12-23 | 2023-08-01 | 望海康信(北京)科技股份公司 | Webpage testing method and device |
CN111209204B (en) * | 2020-01-06 | 2023-09-22 | 杭州涂鸦信息技术有限公司 | Automatic web testing method based on JSON, system and device thereof |
CN111381142A (en) * | 2020-02-21 | 2020-07-07 | 上海御渡半导体科技有限公司 | Semiconductor automatic test equipment and test method for improving test flow efficiency |
CN113448820B (en) * | 2020-03-25 | 2023-04-25 | 中移(成都)信息通信科技有限公司 | Webpage testing method and device |
CN111966580A (en) * | 2020-07-24 | 2020-11-20 | 厦门快商通科技股份有限公司 | Automatic testing method, device, equipment and storage medium based on artificial intelligence |
CN111949539B (en) * | 2020-08-14 | 2023-09-15 | 新睿信智能物联研究院(南京)有限公司 | Automobile electronic basic software testing system based on WEB |
CN112015643A (en) * | 2020-08-25 | 2020-12-01 | 广州鲁邦通物联网科技有限公司 | Method, system, device and storage medium for processing test information |
CN112083992A (en) * | 2020-09-02 | 2020-12-15 | 李振 | UI automation test method |
CN111913889A (en) * | 2020-09-11 | 2020-11-10 | 中移(杭州)信息技术有限公司 | Test system building method and test system |
CN112559366B (en) * | 2020-12-23 | 2024-02-06 | 中国移动通信集团江苏有限公司 | Method, device, system, equipment and storage medium for updating test object |
CN112597031A (en) * | 2020-12-26 | 2021-04-02 | 中国农业银行股份有限公司 | Web page test case generation device and method |
CN112711534A (en) * | 2020-12-28 | 2021-04-27 | 广州品唯软件有限公司 | Automatic testing method and device |
CN112597043A (en) * | 2020-12-28 | 2021-04-02 | 深圳供电局有限公司 | Software testing method and device, computer equipment and storage medium |
CN112631939A (en) * | 2020-12-31 | 2021-04-09 | 广州方硅信息技术有限公司 | Use case configuration method, use case configuration device, and readable storage medium |
CN113448845A (en) * | 2021-06-22 | 2021-09-28 | 重庆长安汽车股份有限公司 | UI automation test method and system |
CN113806150B (en) * | 2021-08-16 | 2024-02-13 | 济南浪潮数据技术有限公司 | Method, system, equipment and storage medium for remote test of storage server |
CN113836042A (en) * | 2021-11-18 | 2021-12-24 | 四川启睿克科技有限公司 | Web automated testing framework system |
CN114297076A (en) * | 2021-12-30 | 2022-04-08 | 四川启睿克科技有限公司 | Automatic testing method for Web website |
CN116185879B (en) * | 2023-04-26 | 2023-07-07 | 润芯微科技(江苏)有限公司 | Python-based intelligent cabin instrument automatic test method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101882107A (en) * | 2010-06-28 | 2010-11-10 | 山东中创软件商用中间件股份有限公司 | Method and device for automatically testing WEB (World Wide Web) application |
CN105159833A (en) * | 2015-09-30 | 2015-12-16 | 努比亚技术有限公司 | Automatic testing device and method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8739126B2 (en) * | 2010-09-03 | 2014-05-27 | Salesforce.Com, Inc. | Web services environment testing framework |
-
2016
- 2016-10-20 CN CN201610914969.9A patent/CN106547689B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101882107A (en) * | 2010-06-28 | 2010-11-10 | 山东中创软件商用中间件股份有限公司 | Method and device for automatically testing WEB (World Wide Web) application |
CN105159833A (en) * | 2015-09-30 | 2015-12-16 | 努比亚技术有限公司 | Automatic testing device and method |
Also Published As
Publication number | Publication date |
---|---|
CN106547689A (en) | 2017-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106547689B (en) | A kind of automatic test cases development system and method based on web | |
CN110764753B (en) | Business logic code generation method, device, equipment and storage medium | |
US8402434B2 (en) | Graphical user interface (GUI) script generation and documentation | |
CN104615541B (en) | Emulation testing modeling and method based on flow chart | |
Grilo et al. | Reverse engineering of GUI models for testing | |
US10678666B1 (en) | Method and system for implementing automated test and retest procedures in a virtual test environment | |
CN105843630A (en) | Method for graphical programming development based on robot | |
Greevy et al. | Visualizing live software systems in 3D | |
Marchetto et al. | A case study-based comparison of web testing techniques applied to AJAX web applications | |
Marchetto et al. | Reajax: a reverse engineering tool for ajax web applications | |
CN101025686A (en) | Automation test system and test script generating and operating method | |
KR20160070410A (en) | System for testing an application use for a smart device and method therefor | |
CN102508775A (en) | Interactive automation test system | |
CN106250134B (en) | The code automatic generation method of single language | |
Gortney et al. | Visualizing microservice architecture in the dynamic perspective: A systematic mapping study | |
Saddler et al. | EventFlowSlicer: a tool for generating realistic goal-driven GUI tests. | |
Chandler et al. | AD2US: An automated approach to generating usage scenarios from UML activity diagrams | |
Clerissi et al. | Test driven development of web applications: A lightweight approach | |
Konrad et al. | Visualizing requirements in UML models | |
Wen et al. | “Integrare”, a collaborative environment for behavior-oriented design | |
Honfi et al. | Seviz: A tool for visualizing symbolic execution | |
CN113434387A (en) | Script-driven-based automatic testing tool and system | |
Nguyen et al. | Automated functionality testing through GUIs | |
Rugaber | A tool suite for evolving legacy software | |
CN110990286A (en) | BDD-based unit test system |
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 |