Parabank Parasoft Test Cases
Download extension Xpath Helper in Chrome. Link: https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl?hl=en “/” : find from Root “//” : find anywhere in the Document “*”…
System Properties In Properties, we examined the way an application can use Properties objects to maintain its configuration. The Java…
Java Programming Tutorial Credits: Practice problems taken from below Site. http://www.ntu.edu.sg/home/ehchua/programming/java/j2a_basicsexercises.html#zz-5 Exercises on Java Basics You need to do these…
The if-then and if-then-else Statements The if-then Statement The if-then statement is the most basic of all the control flow…
Program: List of JUnit annotations. Annotations are introduced in JUnit4. Here are the list of annotations and its descriptions…
Understanding JUnit Annotations: Try running below Program.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
package JUnitFW; import static org.junit.Assert.*; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; public class JUnitTest { @BeforeClass public static void setUpBeforeClass() throws Exception { System.out.println("Inside Before Class"); } @AfterClass public static void tearDownAfterClass() throws Exception { System.out.println("Inside After Class"); } @Before public void setUp() throws Exception { System.out.println("Inside Before "); } @After public void tearDown() throws Exception { System.out.println("Inside After"); } @Test public void test1() { //fail("Not yet implemented"); System.out.println("Inside 1st Test"); } @Test public void test2() { //fail("Not yet implemented"); System.out.println("Inside 2nd Test"); } @Test public void test3() { //fail("Not yet implemented"); System.out.println("Inside 3rd Test"); } } |
Result: Inside Before Class Inside Before Inside 1st Test Inside After Inside…
Program: Simple JUnit test using @Test annotation. JUnit is a simple framework to write repeatable tests. It is an…
Test Plan Test Strategy A test plan for software project can be defined as a document that defines the scope,…
Course Registration System Test Plan for the Architectural Prototype Version 1.0 Revision History Date Version Description Author 7/March/1999 1.0 Initial…
Access Modifiers in java There are two types of modifiers in java: access modifiers and non-access modifiers. The access modifiers…
Below Program is a Demonstrate usage of Class, Objects, variables and Methods. Calculator Class Source File:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
package com.mypacakage.demo; class CalculatorClass { int val1; int val2; int result; String operation; //Call Below Function after Object creation with arguments //These function will set Result instance variable and display the result //Addition Function public void addition(int arg1, int arg2){ result = arg1+arg2; } //Subtraction Function public void subtraction(int arg1, int arg2){ result = arg1-arg2; } //Multiplication Function public void multiplication(int arg1, int arg2){ result = arg1*arg2; } //Division Function public void division(int arg1, int arg2){ result = arg1/arg2; } //Call any Operation //Function to Demonstrate that while Object is created from other Class Function, //we can set the Class instance variable val1 and val2 and just call the this function public void call_any_ops(char ops){ switch(ops){ case 'A': addition(val1,val2); break; case 'S' : subtraction(val1,val2); break; case 'D' : multiplication(val1,val2); break; case 'M' : division(val1,val2); break; } //Call Show Result Method showresult(); } public void showresult(){ System.out.println("Result of the Operation: " + result); } } |
CalculatorTest Class Source…
Demonstrating Object Classes and Methods Usage Addition and Subtraction as methods of the Public Class Multiplication as Object of Different…
A Java method is a collection of statements that are grouped together to perform an operation. When you call the…
The for Statement The for statement provides a compact way to iterate over a range of values. Programmers often refer…
Q #1) What is Automation Testing? Q #2) What are the benefits of Automation Testing? Q #3) Why should Selenium…
Why do we need Cross Browser Testing? Web based applications are totally different from windows applications. A web application can…
Java String In java, string is basically an object that represents sequence of char values. An array of characters works…
What is Constructor? When the object is created, Java calls the constructor first. Any code you have in your constructor…
What is Eclipse? In the context of computing, Eclipse is an integrated development environment (IDE) for developing applications using the…
Naming a Package With programmers worldwide writing classes and interfaces using the Java programming language, it is likely that…
VBScript In-Built Functions List. Click on Functions for exact syntax and usage. You will be navigated to w3schools.com. Date/Time Functions…
Java Variables: Java is a strongly typed programming language. This means that every variable must have a data type associated…
Convert using Integer.toString(int) The Integer class has a static method that returns a String object representing the specified int parameter.…
Java Program Hello World To Execute Below Program; put this code in text file. Save as File”name.java”
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
class akash{ public static void main(String args[]){ System.out.println("Hello akash"); } } class amit{ public static void main(String args[]){ System.out.println("Hello amit"); } } class sumit{ public static void main(String args[]){ System.out.println("Hello sumit"); } } class vikas{ public static void main(String args[]){ System.out.println("Hello nitin"); } } |
Open…
Java OOPs Concepts In this page, we will learn about basics of OOPs. Object Oriented Programming is a paradigm that…
VB Script Basics Tutorials Note: This PPT is developed by Dani Vainstein and ITPA does not Claim any Ownership of…
VB Script Basics Tutorials Note: This PPT is developed by Dani Vainstein and ITPA does not Claim any Ownership of…
VB Script Basics Tutorials Note: This PPT is developed by Dani Vainstein and ITPA does not Claim any Ownership of…