Testing Engineer Interview Questions | Glassdoor.co.in

# Testing Engineer Interview Questions

4,832

Testing engineer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

### Software Development Engineer In Test (SDET) at Microsoft was asked...

24 Mar 2012
 Sorting Algorithms Optimizations from 2 loops to just 1 loop5 AnswersNC#include #include using namespace std; int main() { int list = {5, 4, 3, 6, 7, 1, 2, 9, 8, 10}; for (int i=0; i= 0 && next list[next]) { int temp = list[i]; list[i] = list[next]; list[next] = temp; next--; } else next++; } } for (int i=0; i<10; i++) { cout << list[i] << " "; } return 0; }you still have two loops #include #include using namespace std; int main() { int list = {5, 4, 3, 6, 7, 1, 2, 9, 8, 10}; for (int i=0;j=i; i<10; i++;j++) { I can't remember, but you use two indices within one loop to sort using bubble sort } for (int i=0; i<10; i++) { cout << list[i] << " "; } return 0; }Show more responsesuse quicksort. it has runtime of O(n.logn), or heapsort. they both use one for loop and a heap/stackstatic void Main(string[] args) { int[] arr = new int[] { 8, 9, 6, 7, 4, 5, 2, 3, 1 }; int i = 0; bool swapped = true; while (swapped || i arr[i + 1]) { int temp = arr[i+1]; arr[i + 1] = arr[i]; arr[i] = temp; swapped = true; i=0; } else { i++; swapped = false; } } foreach ( int element in arr) { Console.Write("{0} ",element); } } } --------------------- contact.if.urgent@gmail.com

### Automation Test Engineer at Oracle was asked...

13 Feb 2016
 Code to find a repeated number in an array3 Answerspublic void CountTheRepeatedNumber(int[] arr){ Map map=new Hashmap(); for(Integer num:arr){ if(map.containsKey(num)){ map.put(num,map.get(num)+1); //increase the value if it is repeated } else{ map.put(num,1); // put 1 into value if number is first time present } } Set key=map.KeySet(); //return you all the distinct integer number for(Integer i:key){ if(map.get(i)>=0){ syso(i +" is " +map.get(i) +"Times in an array"); //simply print this so u will get repeated numbers with count and just print it } }public void unique(){ int[] numbers = {1,2,2,3,4,5,5,6,7}; Arrays.sort(numbers); System.out.println("Sorted : "+numbers.length); for(int i = 1; i < numbers.length; i++) { if(numbers[i] == numbers[i - 1]) { System.out.println("Duplicate: " + numbers[i]); } } }//Finding the number which appeared twice public static void findDuplicates(int[] a) { Map hashmap = new HashMap(); for(int i=0;i entries : hashmap.entrySet()) { if(entries.getValue()>1) { System.out.print(entries.getKey()+" "); } } }

### Test Engineer at Infor was asked...

10 Jul 2017
 Tell me about yourself 3 AnswersSome programming codesIs results are announced that held on july1Are results anounced for interviews held on 2nd july?

### Software Development Engineer In Test (SDET) at Microsoft was asked...

24 May 2012
 Write a program to find out in a sorted array the sum of any two numbers present in the array is closest to the a number given. if you have an array 4, 6, 8,24,36 and the given number is 31 then output should be 24 + 6 = 304 Answersmain() { int a[]={4, 6, 8,24,36 }; int i=0,j=4; int sum=31,temp,ans; ans=0; while(iint[] arr = new int[] {4, 6, 8, 24, 36}; int number = 60; int diff = 9999; int index = 0; int index2 = 0; for(int i = 0; i < arr.length; i++) { for(int j = i + 1; j < arr.length; j++) { if(Math.abs((arr[i] + arr[j]) - number) < diff) { diff = Math.abs((arr[i] + arr[j]) - number); index = i; index2 = j; } } } int sum = arr[index] + arr[index2]; System.out.println(arr[index] +" + "+ arr[index2] +" = " +sum);static void Main(string[] args) { int[] arr = new int[] { 2, 4, 8, 24, 36, 72, 108 }; int i, j, num = 0, diff = int.MaxValue, a=0, b=0; for ( i = 0; i < arr.Length; i++) { for ( j=0; j < arr.Length; j++ ) { int sum = arr[i] + arr[j]; int newDiff = Math.Abs(sum - num); if (newDiff < diff) { a = arr[i]; b = arr[j]; diff = newDiff; } } } Console.WriteLine("{0} + {1} = {3} is closest to {2}", a, b, num, a+b);Show more responsesUpdated Answer which ignores same array elemets to be added for sum. ---------------- static void Main(string[] args) { int[] arr = new int[] { 2, 4, 8, 24, 36, 72, 108 }; int i, j, num = 1111, diff = int.MaxValue, a=0, b=0; for ( i = 0; i < arr.Length; i++) { for ( j=0; j < arr.Length; j++ ) { if (i != j) { int sum = arr[i] + arr[j]; int newDiff = Math.Abs(sum - num); if (newDiff < diff) { a = arr[i]; b = arr[j]; diff = newDiff; } } } } Console.WriteLine("{0} + {1} = {3} is closest to {2}", a, b, num, a+b); } -------------------------- contact.if.urgent@gmail.com

### Software Development Engineer In Test at Harness was asked...

5 Aug 2018
 Do you think SDET deserve this much salary?3 AnswersI said yes.You have clearly posted revenge comment because you were not selected and you may feel privileged to be selected.If you can't take your critiscisms/feedbacks with common sense, not sure what to say.

### Software Test Engineer at Amdocs was asked...

26 May 2018
 What are the attributes of the anchor tag? How do you get an image within a webpage, clicking on which can take you to another webpage? 3 AnswersAttributes of anchor tag(//a) are : href, class, id, oncl1ck,etcAttributes of anchor tag(//a) are : href, class, id, oncl1ck, etcWhen I wrote i, It is taking 1

### Software Development Engineer In Test (SDET) at Microsoft was asked...

17 Dec 2009
 how to merge two linked lists without using temp node3 Answersyou can modify the lists to form circular lists. that both are merged to each other without temp.In case link lists are sorted, then per-form merge sort tech. otherwise above seems fineSuck my dick to know the correct answer..!

### Test Engineer at Nagarro was asked...

12 Nov 2017
 IQ Test was easy. You have to answer 50 questions in 12 minutes.3 AnswersClearedcan you tell question topicsHi, Any idea what kind of questions are asked in QA Test round?

### Test Automation Engineer at Oracle was asked...

28 Mar 2018
 Is Webdriver a class or interface?3 AnswersIt is an Interface.Webdriver is basically an Interface which is always implemented by any of browser class like ChromeDrive() , FirefoxDriver(), OperaDriver() etc.WebDriver is an interface which can be implemented by the class which implements it. ChromeDriver,geckoDriver,IEDriver these are the class which implements the webdriver interface . Since webdriver is an interface it contians all the abstract methods .These methods are implemented by the class implementing the interface . Hence in our code we write WebDriver driver = new ChromeDriver(); we can also write ChromeDriver driver = new ChromeDriver(); But here we can only invoke methods that are of chrome driver. Whereas in WebDriver driver = new ChromeDriver(); we can invoke the methods of both chrome driver and webdriver

### Software Development Engineer In Test at Snapdeal was asked...

19 Sep 2016
 wap to search an element in a rotated array ?, wap to merge and then sort 3 different linked lists.?3 AnswersThese were the questions for written round? Written test was pen paper test or an online test?yes those questions were for written technical round and it was -pen and paper based testInterviews for the same were on the same day?
2130 of 4,832 Interview Questions