PERFORMACE TESTING

 

Common Terms:

1) Throughput: No. of request can be sent in one minute

2) Threshold: Limit of Response time

    a) Toleration Threshold: Eg: 500 msec

    b) Frustration Threshold Eg: 1500 msec

3) Ramp up time: Time frame gap to increase the users

4) Soak test: Endurance test: How application performs over period of time



REPORT

CMD FOR REPORT GENRATION:

1) Navigate to Bin location in Command Prompt

2) Use following command

jmeter -n -t C:\Users\Amitkumar_Singh\Desktop\Jmeter\Exercise1GST.jmx 
-l C:\Users\Amitkumar_Singh\Desktop\Jmeter\Results\Result1.csv 
-e -o C:\Users\Amitkumar_Singh\Desktop\Jmeter\Htmlreport\Report1

a) Project Loction - Exercise1GST.jmx
b) CSV Location - Result1.csv 
c) HTML Report location - Report1

3) Report






Interview Code- Java

 1) REVERSE THE STRING


public class ReverseString {

public static void main (String[]args)

{

                String str="Interview";

                String rstr= "";

for (int i=0; i<str.length(); i++)

{

rstr= str.charAt(i) + rstr;

}

System.out.println(rstr);

}

}


PALINDROME

public void palendrome ()

{

String num;

Scanner sc= new Scanner (System.in);

System.out.println("Enter the Number");

num= sc.nextLine();

String Revnum = "";

for (int i=num.length()-1;i>=0;i--)

{

Revnum =Revnum + num.charAt(i);

}

System.out.println("Reverse number is" +Revnum);

if (num.equals(Revnum))

{

System.out.println("Number is Palendrome");

}

else

{

System.out.println("Number is not  Palendrome");

}

}


PRIME NUMBER

public void primeNumber() {

    int num;

    Scanner sc = new Scanner(System.in);

    System.out.println("Enter the Number");


    num = sc.nextInt();


    if (num <= 1) {

        System.out.println("Number is not prime");

        return;

    }


    boolean isPrime = true;

    for (int i = 2; i <= Math.sqrt(num); i++) {

        if (num % i == 0) {

            isPrime = false;

            break;

        }

    }


    if (isPrime) {

        System.out.println("Number is prime");

    } else {

        System.out.println("Number is not prime");

    }

}


FIBONACCI

        public static void main (String[]args)

{

                int n = 20;

  // Print the first N numbers

        for (int i = 0; i < n; i++) {

 System.out.print(fib(i) + " ");

        }

}

//Fibonacci series

static int fib(int n)

{

                             if (n <= 1)

     return n;

             return fib(n-1) + fib(n-2);

}

}