[go: up one dir, main page]

0% found this document useful (0 votes)
16 views18 pages

JIRA

This is my project main file

Uploaded by

sudinabhargavi28
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views18 pages

JIRA

This is my project main file

Uploaded by

sudinabhargavi28
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

TESTING

Software is a solution of program of lines of codes


Project is a certain work that has time effort and cost start -i/p & end time -o/p
Domain is key business area. Know completely about one business field
everything from pin to pin.
Technology is Programming language - java, Database -sql, Apache -webserver
Platform is target system configuration. Windows, Mac, ioss
Testing is nothing but using a software with the intention of finding bugs.
System Development Life Cycle (SDLC ):
Waterfall Model

Unit & Integration testing(Grey box testing) is performed by Developers


Unit testing is testing basic block of code
System testing is performed by QA team
UAT User acceptance testing is performed by Client
Client – UAT if UAT in QA environment it is Alpha testing
If UAT in Production environment it is beta testing
White box testing which involves in coding
Black box testing is functionality
UAT – User Application testing
SIT – System Integration testing
Quality assurance is a broad process for preventing quality failures. The QA team is
involved in all stages of a product's development: production, testing, packaging, and
delivery.
Defect: Errors or Bugs; A difference in the Expected: Deviation from the expected
form of working.
Fault is when it is working incorrectly
Failure is when a feature is working not at all
V-model

Verification : Checks if the created software, hardware, & documentation. Is in


accordance with the company’s standards or not. – typically involves reviews,
Did we built the right system
Validation : Physically ensuring that the system operates according to the plan.
Did we built the system right. We execute the product based on a series of tests.
We perform the test and execute the results.
Questions for testing in java
What is java
Java interfaces
Abstract classes
Java features
Generics in java
How can we write interfaces
Sample code of interfaces
Java string, substring, String – count of characters, count of numbers
Questions on Selenium
Open the browser – maximize it
How to check downloaded file at particular location
How we can open new url in incognito mode
Selenium commands
Old selenium & new selenium
Basic SQL qns
Git
How to merge the code
how to commit the code
how to push & pull the code
how to resolve the conflict
Jira

The Agile process is a time boxed, iterative approach to software development,


to delivery the product incrementally, instead of all at once.
Reverse the string
Here take a string as “Hello World”

Without using reverse string instead here we can use swapping method

Swap the characters from left to right side

Once done with each character swapping then we can see reverse string i.e., “dlroW olleH”

Reverse words in a string


Here take a string as “hello world”

And write the words in reverse order i.e., “world hello”

Palindrome
Here take a string “madam”

And check the characters that are matching

From left side to right side & right side to left side

If it matches then it is a palindrome

If it doesn’t matches then it is not a palindrome.

Anagrams (elbow = below)

#include <stdio.h>
void reverse_array(int arr[], int size) {
int left = 0;
int right = size - 1;

while (left < right) {


int temp = arr[left];
arr[left] = arr[right];
arr[right] = temp;
left++;
right--;
}
}

void print_array(int arr[], int size) {


printf("[");
for (int i = 0; i < size; i++) {
printf("%d", arr[i]);
if (i != size - 1) {
printf(", ");
}
}
printf("]\n");
}

int main() {
int arr[] = {1, 2, 3, 4, 5, 6, 7, 8};
int size = sizeof(arr) / sizeof(arr[0]);

printf("Original array: ");


print_array(arr, size);
reverse_array(arr, size);

printf("Reversed array: ");


print_array(arr, size);

return 0;
}

#include <stdio.h>

void rotate_array(int arr[], int size, int n) {


n = n % size;
int temp;
for (int i = 0; i < n; i++) {
temp = arr[0];
for (int j = 0; j < size - 1; j++) {
arr[j] = arr[j + 1];
}
arr[size - 1] = temp;
}
}

int main() {
int arr[] = {1, 2, 3, 4, 5};
int size = sizeof(arr) / sizeof(arr[0]);
int n = 2;
printf("Original array: ");
for (int i = 0; i < size; i++) {
printf("%d ", arr[i]);
}
printf("\n");
rotate_array(arr, size, n);

printf("Array rotated by %d positions: ", n);


for (int i = 0; i < size; i++) {
printf("%d ", arr[i]);
}
printf("\n");

return 0;
}
#include <stdio.h>
#include <stdlib.h>

void flatten_array(int *arr, int size, int **flatten_result, int *flatten_size) {


for (int i = 0; i < size; i++) {
if (arr[i] >= 0) {
(*flatten_size)++;
*flatten_result = (int *)realloc(*flatten_result, (*flatten_size) * sizeof(int));
(*flatten_result)[*flatten_size - 1] = arr[i];
}
else if (arr[i] == 2) {
flatten_array(arr[i], 3, flatten_result, flatten_size);
}
}
}

int main() {
int arr[] = {1, 2, 3, 4, 5, 6};
int *flatten_result = NULL;
int flatten_size = 0;
flatten_array(arr, 6, &flatten_result, &flatten_size);
printf("Flattened array: [");
for (int i = 0; i < flatten_size; i++) {
printf("%d", flatten_result[i]);
if (i < flatten_size - 1) {
printf(", ");
}
}
printf("]\n");
free(flatten_result);
return 0;
}

git remote add <remote-name> <remote-url>

What are levels of system logging? ( dedug,trace,info,warning,error,fatial)

1)Given an array of distinct integers, find all the pairs having positive value and
negative value of a number that exists in the array. Return the pairs in any
order.
Note: The pair consists of equal absolute values, one being positive and another
negative.
Return an empty array, if no such pair exists.
Input: 4 8 9 -4 1 -1 -8 -9
Output: [-1 ,1, -4, 4, -8, 8, -9, 9]

Step 1: Initialize an array with 8 integers.


Step 2: Find the size of the array.
Step 3: Loop through each element in the array.
Step 4: For each element, loop through each element after it.
Step 5: For each pair of elements, check if they have opposite signs and equal
absolute values.
Step 6: If the condition is true, print the two elements.
Step 7: Repeat steps 4-6 for all pairs of elements.
Step 8: End the program.

import java.util.*;

public class Distant {

public static void printPairs(int[] arr, int n)


{
HashSet<Integer>hs = new HashSet<Integer>();
ArrayList<Integer>ans = new ArrayList<Integer>();
for (int i = 0; i < n; i++) {
if (hs.contains((arr[i]) * -1)) {
if (arr[i] < 0) {
System.out.print(arr[i]);
System.out.print(" ");
System.out.print((arr[i] * -1));
System.out.print(" ");
}
else {
System.out.print((arr[i] * -1));
System.out.print(" ");
System.out.print(arr[i]);
System.out.print(" ");
}
}
hs.add(arr[i]);
}
return;
}
public static void main(String[] args)
{
int[] arr = { 4, 8, 9, -4, 1, -1, -8, -9 };
int n = arr.length;
printPairs(arr, n);

}
}

Fibonacci Sequence Up to a Certain Number


Input : 8 Output : [0,1,1,2,3,5,8,13]

Step 1: Initialize an Array List to store Fibonacci numbers.


Step 2: Start with the first two Fibonacci numbers (0 and 1).
Step 3: Use a loop to generate Fibonacci numbers until the next number exceeds the given
input number.
Step 4: Return the generated Fibonacci sequence.
Step 5: End the code

import java.io.*;
class fib {
static void Fibonacci(int N)
{
int num1 = 0, num2 = 1;
for (int i = 0; i < N; i++) {
System.out.print(num1 + " ");
int num3 = num2 + num1;
num1 = num2;
num2 = num3;
}
}
public static void main(String args[])
{
int N = 8;
Fibonacci(N);
}
}

public class Main {


public static void main(String[] args) {
String[] words = {"flower","flow","fling"};
String prefix = commonPrefix(words);
System.out.println(prefix);
}
private static String commonPrefix(String[] words) {
int counter = 0;
external:
for (int i = 0; i < words[0].length(); i++) {
char letter = words[0].charAt(i);
for (int j = 1; j < words.length; j++) {
if (words[j].length() <= i || letter != words[j].charAt(i)) {
break external;
}
}
counter++;
}
return words[0].substring(0, counter);
}
}

You might also like