In this video tutorial we are going to learn how to use JUnit Framework in Selenium WebDriver.In this we are going to study the structure of the JUnit.
JUnit is an open-source Unit Testing Framework for JAVA. It is useful for Java Developers to write and run repeatable tests.
Developers who are following test-driven methodology must write and execute unit tests first before any code.
Step 1) Visit http://junit.org/junit4/ and click Download and Install
Annotation is a special form of syntactic meta-data that can be added to Java source code for better code readability and structure. Variables, parameters, packages, methods and classes can be annotated.
Some of the JUnit annotations which can be useful are
→ Before
→ After
→ BeforeClass
→ AfterClass
→ Ignore
→ RunWith
→ Test
Annotations and Description:
@Test
This annotation is a replacement of org.junit.TestCase which indicates that public void method to which it is attached can be executed as a test Case.
@Before
This annotation is used if you want to execute some statement such as preconditions before each test case.
@After
This annotation can be used if you want to execute some statements after each Test Case
@BeforeClass
This annotation is used if you want to execute some statements before all the test
@AfterClass
This annotation can be used if you want to execute some statements after all test cases
@Ignores
This annotation can be used if you want to ignore some statements during test execution.
@Test
This annotation can be used if you want to set some timeout during test execution
For more details: www.programmingline.com/selenium/junit
#ProgrammingLine #Rakesh #SeleniumCourse
*******************************************************
Java Course: • Java Course
Python Course: • Python Course
Software Design Patterns Course: • Software Design Patterns
OOPs Course: • OOPs Course
NLP Course: • NLP Course
Software Interview Tips: • Software Interview Tips
Important Links:
Skillshare - Best Online Learning Platform (2 Free Months of Premium Membership): https://programmingline.com/skillshare
Java Course: https://programmingline.com/java-course
Software Design Patterns Course: https://programmingline.com/software-...
Object Oriented Programming (OOPs) Course: https://programmingline.com/oops
Best Books for Software Courses: https://programmingline.com/best-book...
Campus Interview: https://programmingline.com/campus-in...
How to crack the programming aptitude round?: https://programmingline.com/how-to-cr...
*******************************************************
Subscribe my YouTube channels:
► Subscribe / @programminglineinenglish8654 channel for watching Software Related courses like Java, Software Design Patterns, OOPs, and etc in Telugu.
► Subscribe / @roadtoinvestment7954 channel for watching Income Tax saving schemes and Stock Market related videos.
► Subscribe / @rakesh-ms7tn channel for watching Terrace Gardening Tips, Unboxing products, and Random videos in Tamil, Telugu, and English.
Website: www.programmingline.com
FaceBook page: / programminglineofficial
Instagram: / programmingline
Twitter: / programmingline
*******************************************************