Four, this is I think testng very good point ~ ~ ~ really great, testng there is a way, so that users can be in the testng XML file and directly into the code, but there are drawbacks, if you forget to pass,,, the code will directly ignore this methodSpecifically, this is@
: Allows multiple test tasks to be run concurrently and in different environments, dramatically speeding up the functional testing of Web applications.
The idealized use of selenium to write test case is to perfect the test script by selenium the IDE record script, through Firebug to help locate the page element, and then through the selenium RC. The Selenium IDE is a Firefox plug-in that can be scripted and case converted, so Selenium Ide+firebug will be the two biggest helpers for your future
Learning Selenium a period of time, just at the beginning of the contact did not use the framework but from the basic beginning to write. When learning to a certain point, suddenly wondering if there is something better to be able to show this test result, such as LR performance Test Generation performance report, like the iOS automated test run to show the expected results. In this way, the study of thinking is really important, because the work of m
Reproduced in: http://qa.blog.163.com/blog/static/190147002201510275306185/The group Borrie about the interface automation of the article have looked over, are about the test process encountered problems and solutions, there is no framework to build the blog post. I have not done interface automation and Java Rookie, to build a good framework is the first step. Record the construction process, hope to be ab
Namevaluepair, one is to encapsulate the request parameters in the way of Jsonobject, so the code is implemented for both methods. The 3.3 Interface Implementation (Glist_api.java) takes "create G-single" as an example to implement the interface: 3.4 Prepare the test data (Testdata.java) to prepare the test data for the interface. 3.5 test Data parameterization (Glistdataprovider.java), the number of parameters returned needs to be consistent with the number of function parameters in Testsuit.
This test framework can execute the written test case in a custom order, taking the selenium webdriver automated test case as an example:1. Create a new Java project named Fortestng, and then make a Libs folder to import all and selenium related jar packages:2. Install testng, click Help->install New Software in Eclipse, click Add,location Fill in "Http://beust.com/eclipse", then click OK:Then tick
1. Start by writing code, install Eclipse, website download software, https://www.eclipse.org/downloads/, remember first install Java, the proposal installs JDK1.7 above.
2. The next need to write selenium's code,testng code, from selenium, Selenium-server-standalone-2.41.0.jar,testng,testng-6.8.jar website Download the corresponding jar file, put into Eclipse's
Namevaluepair, one is to encapsulate the request parameters in the way of Jsonobject, so the code is implemented for both methods. The 3.3 Interface Implementation (Glist_api.java) takes "create G-single" as an example to implement the interface: 3.4 Prepare the test data (Testdata.java) to prepare the test data for the interface. 3.5 test Data parameterization (Glistdataprovider.java), the number of parameters returned needs to be consistent with the number of function parameters in Testsuit.
Architecture
This framework is created using ant, testng and selenium.Through this framework, a user is able to create an automatic test case which can be run later by executing a single command. The uses of different frameworks are as follows:Selenium: this framework is needed for recording a testcase, exporting it i
add assert assert, so here will not fail, My goal is to fully use Excel to manage maintenance test data and test results, so that the data scripts are completely detached.Output SheetComparison SheetResult SheetOf course you can also run the MAVEN project as an executable jar, but you need to add a main function as a portal, the XML test file is passed through the parameters, and you need to configure some plugins in the Pom, like Maven-jar-plugin.If you still need to do back-end DB check, you
In the code for the development of the eclipse that is being used, it is inevitable that unit tests will be required to provide more framework unit tests in the case of unit tests, such as using JUnit unit tests, while developing better unit tests abroad, providing better test reports, JUnit and testng are not many similar differences, while testng provides more
Recently to summarize the automated test selenium some of the commonly used framework test collocation, by simple into the complex, the simplest is selenium+java+testng, because I use Java, just summarize the next java.TestNG Online Installation:Open Eclipse help->install New software, then add "Http://beust.com/eclipse"Select Testng,finish next to complete the i
xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > This dependency is provided by the JDK, container, or User. such as Servlet.jar. * runtime, used only at runtime, such as JDBC driver, for run and test Phases. *test, used only during testing, to compile and run the test Code. Will not be published with the Project. * system, similar to provided, needs to explicitly provide a jar containing dependencies, MavenIt is not found in Repository.
4-run
Testng can be called in multiple ways:
Command Line
Ant
Eclipse
Intellij's idea
This section only describes how to run testng from the command line. If you are interested in other methods, click the above link to view more information.
Assume that testng is already in your class path. The simplest call method is as follows:
java org.testng.TestNG test
Eclipse Version: LunaOnline installation of testng version 6.9This issue occurs because the TestNG version issue or the features plugin is not installed on the online installationThe following are the solutions:Found a lot of classmates and I just as unable to install testng online, now share an offline installation method, and installation files, hoping to help
TestNG relies on simple method dependencies for testing, configuring dependent methods through the Dependsonmethods propertyOriginal articles, all rights reserved, permitted reprint, Mark Source: Http://blog.csdn.net/wanghantongJava Code:[Java]View PlainCopy
/**
*
*
* Title:testngdependencies
*
*
*
* Description:testng provides two kinds of dependency implementations
*
* 1. Forced dependency: If there is a failure in a depende
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.