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 many times is their own groping process, such
Eclipse Install testng PluginWhat is testng?TESTNG is defined by its documentation as:TESTNG is a test framework that is inspired by JUnit and NUnit, but introduces some new features that make it more powerful and easier to use.TestNG is an open source automation testing framework;
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
1, testng, multiple execution of use cases@Test (Dataprovider = "Data-provider")Add the parameter source after the @test tag: Dataprovider (Data-provider)How many sets of data are in the Data-provider, @Test how many times the data will be executed2, the configuration and use of Dataprovider @DataProvider (name = "Data-provider") //Iterator iterator protected Iterator Testprovider () { Listnew arraylist(); Dataorigin.add (new ob
After testing with testng, the HTML test report is automatically generated. The TESTNG-XSLT can be used to rewrite the test report.
Test-out/index.html
1. Download Testng-xslt and unzip on the official websiteLink:http://testng-xslt.googlecode.com/files/testng-xslt-1.1.2
. What is testng?
TESTNG is defined by its documentation as:
TESTNG is a test framework that is inspired by JUnit and NUnit, but introduces some new features that make it more powerful and easier to use.
TestNG is an open source automation testing framework;
Junit (3) Introduction to JUnit and unit testing, junit Unit Testing
1. Several Related Concepts
White-box test-the test object is regarded as an open box. The logic structure and other information in the program are made public to the tester.
Regression testing-software or environment repair or corrected "retest", which is especially useful for such testing.
Uni
4-Run TestNG
TestNG can be invoked in a different way:
* Command line * ant * Eclipse * IntelliJ's IDEA
1) Command line
Let's say you've added testng to class path, calling TestNG the simplest method:
java org.testng.TestNG testng1.xml [testng2.xml testng3.xml ...]
You must specify at least one XML f
tools that apply the advantages of unit testing to various languages. NUnit (. NET), Pyunit (Python), CppUnit (c + +), Dunit (Delphi), and other tools affect the testing of programmers on a variety of platforms and languages.
However, JUnit is just a tool. The real advantage comes from the ideas and techniques that JUnit uses, not the framework itself. Unit testing, test-first programming, and test-driven
Selenium Introduction and environment constructionFirst, Brief introduction1.selenium:seleniumis one forWebTools for application testing. SeleniumThe test runs directly in the browser, just as the real user is doing. Supported browsers includeIE,Mozilla Firefox,Chromeand so on. Supports automatic recording actions and automatic generation,Net,Java,Pythontest scripts in different languages. SeleniumTestScriptcan be inWindows,Linuxand theMacintosHrunning on multiple platforms. 2.
TestNG uses the Dependsongroups property to test for dependencies,The test method relies on one or some of these methods as a preconditionForced dependency: If an exception is made to a method that is dependent, then the subsequent method will not be executed (default)Sequential dependencies: Subsequent methods are executed regardless of whether the method being relied on is an exception, configured by alwaysrun= "true"[Java]View PlainCopy
/**
*
of the use of each ant built-in task mentioned above in the Ant online Manual.Back to top of pageSummarizeAs more and more developers begin to recognize and accept the idea of extreme programming (XP), the role of unit testing becomes increasingly important in software engineering. This article is intended to introduce you to the latest Unit test tool, JUnit 4, and how to create automated unit test scenarios in conjunction with IDE Eclipse and build
Recently decided to start using testng instead of JUnit as a future unit Test base component.
For the official documents of TESTNG, please see:
1. Introduce
TESTNG is a test framework designed to simplify a wide range of test requirements, from unit tests (one class for isolation tests) to integration testing (testi
PrefaceAs a result of the recent work on the Mirage project, when analyzing a customer problem, the customer mentioned the use of testng to carry out some stress tests, such as continuous shooting more than 500 times, continuous access to set, slide, exit 200 times. At that time consulted the test colleagues in the next project, found that we do less stress testing, performance testing mainly used in the monkey test. Helpless, only oneself study ponde
UI Automation framework, you need to write some code to drive it, and most people will choose JUnit because JUnit is the de facto standard for unit testing, but I'll use testng. These UI Automation things, they're not unit tests in themselves, and they don't have too many unit-testing styles.Start with a simple test
123456789101112131415
pub
The test method in JUnit 3 is to test its own name prefix. Marking some methods in a class has special significance. This is a very effective method, but the name is not well extended (if we want to add more labels for different frameworks ?), Rather than lack of flexibility (if we want to pass the additional parameter testing framework ).
The annotation is officially added to the Java language and testng i
1.gradle Project
Java projects created in Eclipse are managed with Gradle. What I'm going to review is the knowledge of using testng in Gradle. First testng the environment configuration as in the previous article.
There are 2 Java files in the test directory. One is Persontest.java, one is simpletest.
Persontest.java: A test class written with JUnit.
Simpletes
TestNG makes Java unit testing easyFor an in-depth look at testng, please visit: http://www.yiibai.com/html/testng/2013/0914295.htmlDuring the construction phase of each package, the test phase plays a central role in the player. In the past, the days of compiling and testing were gone, and now most developers now recognize the need to encode and test software me
Org.springframework.test.context.junit4.SpringJUnit4ClassRunner extends Org.junit.runners.BlockJUnit4ClassRunner {
...
}
The idea is the same as we discussed above, but it uses a more flexible design: The Spring TestContext framework is introduced to allow access to different UT frameworks (such as junit3.8-,junit4.5+,testng,etc.). In contrast to the Applicationcontextaware interface, it allows you to specify the location of the configuration
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.