• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

SoftwareTestingo - Interview Questions, Tutorial & Test Cases Template Examples

SoftwareTestingo - Interview Questions, Tutorial & Test Cases Template Examples

  • Home
  • Interview Questions
  • Java
  • Java Programs
  • Selenium
  • Selenium Programs
  • Manual Testing
  • Test Cases
  • Difference
  • Tools
  • SQL
  • Contact Us
  • Search
SoftwareTestingo » Interview Questions » Scenario Based Interview Questions

Scenario Based Interview Questions

Last Updated on: January 9, 2022 By Softwaretestingo Editorial Board

What We Are Learn On This Post

  • Situational Interview Questions
  • Scenario Based Interview Questions for Manual Testing
  • Scenario Based Interview Questions for Automation Testing
  • Scenario Based Interview Questions for Freshers
  • Scenario Based Interview Questions for Test Lead
  • Scenario Based Interview Questions in Java
  • Scenario Based Interview Questions and Answers
  • Scenario Based Interview Questions From HR
  • Scenario Based Interview Questions in SQL

Scenario Based Interview Questions: Here we are going to share some of the unexpected scenario-based interview questions which you may face in your upcoming interview. Are you ready to get prepared for this type of interview?

Trust me, prepare an answer because a lot of these questions will be asked during your interviews. As a millennial candidate, it’s very important that you have the full support from your professional HR experts who can help you clarify all that is crucial while preparing for scenario-based interview questions.

Situational Interview Questions

Now we are going to share some of the situational interview questions of Selenium. Hope these questions will help you to answer some of the scenario-based interview questions.

Scenario Based Interview Questions for Manual Testing

  • 100 test cases are there, only we need to execute the selected 5 test cases? Can you please let us know?
  • If there are 100 test case if I want to execute the first 50th test case and after that 1 test case should be executed how you do it
  • There is a release tomorrow you got the build today you are able to execute only 60 % what is your approach to complete 100 %
  • if there are 15000 test cases and you have to test all test cases in very little time what would be your approach
  • There are 25 test cases after running the 20thtest case 21 st test case needs to be executed

When our release in next 2 hours & as a Tester we found a blocker bug then what you will do?

Ans: First thing raise bug we need some ID to track for sure then discuss with Lead/Manager and have called with development team see if they can replicate and fix or have some workaround. If we have a workaround then it’s always suggested go with that for now as the fix may create new issues if we don’t have then discuss with the Product Owner and analyze the business impacts and based on that either we need to fix or notify the customer that it’s known issue for this patch and we fix in later then deploy.

Or You can mention like below

In real-time I’ve handled such issues and in my organization, we called it dry run testing and if it failed then a release decision meeting takes place either to accept the bug if it is serious then either this to be released separately using that hotfix release or planned for the next release and if it is really serious without it you can’t release the latest on production then it has to be fixed on priority and release has to be rescheduled for another 24hr After all, you can’t release something on production which will block the client application which was running 2hr before and suddenly stops working.

You are put into a new team that has a very large backlog of bugs raised since the project’s inception. The bugs have not been reported in a good state and are mostly reported in very small one-line details. Please explain what your approach to handling this would be and how you would arrange these issues into something more usable for the QA Manager to review.

Ans: The first step is to schedule a meeting with the offering Manager and other stakeholders to prioritize the bug severity and priority. Many issues will be irrelevant now as the bugs are in the backlog for since long. Once that exercise is done, take High severity and high-priority bugs and try to reproduce them again. and rewrite the steps, and assign it to sprint ready. Discuss in the sprint planning and then proceed to the next action.

How do you ensure that no past-built functionality is not broken when new functionality is getting developed in the newsprint? Also, if you keep doing regression for past developed sprints (list of which keeps on increasing every sprint with new functionality getting developed), how do to plan for effort or cover up for the functional testing?
Ans: We ensure no past built functionality is not broken when the newsprint starts is by having a good Regression suite Test.

You have 30 test cases to execute and you have limited time to deliver, you cannot take another resource for help, so how u will execute these test cases to deliver on time? What will be ur strategy?

Ans: In such a scenario, we can do:

  • Prioritize the test cases depending on risk, cost, time, and other factors
  • Ask what would happen if you don’t execute 50% of those 30 test cases
  • Understand the 30 test cases and create a mental model to ascertain the best way to test rather than running through step by step for 30 test cases
  • Look for ways to automate at lower levels fully or partly for the 30 test cases
  • Ask yourself why did we end up in this situation
  • Everybody has 24 hours, if it cannot be done in 24 hours there is no way anybody can bring in the 25th hour, so be candid in your feedback
  • Skip 50% of executing 30 test cases, rest 50% monitor in production what those test cases would actually do and how its behaving Leverage unit test cases that can cover up for those 30 test cases
  • Use feature toggle, where you release the product, test in production and release again with just a toggle once you are sure it works as expected
  • Use Blue – Green deployments
  • Highlight the risks to the stakeholders

When the developer is not ready to accept the issue at any cost in this situation what you will do?

Ans: Understand why he is not accepting the bug (it’s as per requirement or not replicated or known issue ). If it’s as per the requirement get the ID check that and mention comments close/cancel. If not replicated try different ways and see what’s different in dev and QA machines (env, test data, exact steps, browsers versions, OS version). If everything is the same and still not able to replicate QA or dev then add comments seems this is an inconsistent issue and if we found again we will open the bug.

What typically helps you determine the appropriate amount of test coverage while creating a test plan?

Ans: No of Test cases pass % and No of Features covered for either Manual or Automation No of defects opened (less no obviously and severity of the defect) by considering all these we can conclude on Test Coverage

At what stage in an SDLC should QA start planning a test strategy for a new feature?

Ans: Not sure does QA need to pitch in at only some point of SDLC things are changed now many QA members are already contributing in Designing of application so I could say at starting only (QA can understand the design/tech stack/flow/DBS)

While reviewing the necessary regression tests that are needed for a particular story, you notice there are currently no automated tests available. Please describe what your next step would be.

Ans: First thing look at the features which are not covered and see are those done repeatedly and critical features then try to create some Tasks and cover along with other works or make this a priority. If not critical features then still have ticket/task to track the Automation for those and whenever any QA gets time ask them to pick and automate.

You are testing the implementation of a new feature. After reading over an Epic provided by the Project Manager, you notice the workflow isn’t performing as designed, however, the end result is working as expected. After reaching out to the Software Engineer you are given an explanation that the feature could not be implemented as documented. Please describe what your next step would be.

Ans: Here we need to discuss with the Product Owner and explain to them how this is designed rather than how it should be if he/she is okay with that then u can ask them to change the story or add in comments (for future reference)

If we are getting bugs in every builds what will be the first approach

Ans: Your Approach should be like below:

  • First step will be to log the bugs.
  • Will first test the critical and high priority test cases
  • One person should start retesting the bugs and other person should start regression.Once the 1st guy has finished the retesting of bugs he can join you in regression.
  • It seems a deployment issue or the environment of QA environment is different from Prod.

Say you have 100 regression test cases and you have 4 days to execute. But you can execute only 20 per day. What will you do in this situation? You have to execute all 100.you can’t leave any. please guys help me how to answer this question
Ans: You can give multiple answers like (not considering risk-based testing as the requirement is to complete all cases.)
1. Ask ur lead to give an extra tester who can complete 5 cases per day.
2. You have to stretch for some days to complete(which we all do sometimes 😂 ).
3. (If cases are automated) Take the help of automation and execute the remaining manual cases.

There is a client issue and one developer is on leave for the entire week and other developers are in the training. The issue needs to be escalated urgently and it has come to the tester to find a root cause of the problem. How will the tester’s approach be? Can someone answer this?
Ans: Based On the Issue i can work like:

1. If it’s a front-end issue, You can quickly check if the issue is reproducible or not. If the issue is reproducible you can try to figure out if the customer is using customized data or if it’s a direct issue, you can also try to find if there are any workarounds that you could help the customer to unblock the issue. If there is no work-around, you can create a bug, and based on the priority and severity of the issue you can escalate to the development manager and see if they can provide a quick hotfix or rollback of the production build.

2. If it’s a back-end issue, you can go to the back-end server and analyze the logs and figure out which particular calls were failing. Once you identify them, you can try to reproduce the issue locally. If the issue can be reproducible locally then you try to find any workarounds. If there are any workarounds inform the customer. If there is no work-around, you can create a bug, and based on the priority and severity of the issue you can escalate to the development manager and see if they can provide a quick hotfix or rollback of the production build. If the issue is not reproducible, see what customer is doing differently (for example any customized data or what kind of environments they are running this functionality, etc) and try to reproduce the same in local /pre-prod/staging environment using the same set of data.

But In most cases, if you don’t have much time to reproduce the issue or even to analyze the logs and if the impact is too huge, its always better to find some workarounds like disabling the feature temporarily or if you don’t find any solution and don’t have time to give a hotfix, its always better to roll back the build to previous stable build in production.

Scenario Based Interview Questions for Automation Testing

If a script fails during the execution how do you debug it and how do you determine whether it is an application error automation error?

Ans: It might be helpful, please find the answers below in logical steps below.

1) Whenever we develop automation scripts, we log information at every level, basically, we log each and every step of what our script is doing, and we use any logging library to generate logs (in the case of java tech stack projects mostly Log4J2 is used), again in logging we have different levels of logs like Info, Pass, Fail, fatal and debug, etc.

so when designing the logging feature of your Test Automation framework, as a team will need to take a call like what level of logs we would be using for application error or automation script error, for example in our logging feature, when our scripts are failed with a fatal level that means its a script problem, if it fails with a Fail level that means its an application Issue.

2) Whenever a script is failed with an error(fatal or fail) irrespective of level, we need to have a stack trace generated in our logs, and looking at the stack trace we can exactly point out which line of code the script failed and can navigate to that line in source code and put a debug point over that line and run your script in debug mode and inspect your variables.

so precisely answering your question looking at the log levels we can say its an application issue or script issue, again if any test automation developer uses a wrong log level in his script source code then it would be a mess, as part of peer code reviews and lead code reviews we strictly make sure that we are adhering to the framework standards. Besides this, we have a rich reporting feature that says at what step the script failed and what is the log level.

There are 3 buttons available in UI. For all 3 buttons, ID is there but in the ID the initial values are kept on changes but at last button1, button2, button3 is there. We want to select the 2nd button. How will you write XPath?

Ans: Yes u can use that or even contains works as ur saying u have number’s in there (button 1,2,3) so u can use XPath which contains button2 or u can even use an index with Id[2]

You are given 200 APIs and 2 weeks. How would you automate those 200 APIs in 2 weeks? They said there could be multiple correct answers.. Any idea what the solution could be?

Ans: Yes, we can automate. Here the way is

  • Already framework in place means to accept the string and convert to JSON and validate the response, status code, etc means reusable methods already in place.
  • all APIS we should place in excel with endpoint, base URL, headers test data it means where ur required JSON file located.
  • finally, run ur testng.xml and get the result Ok take it for simple 10 APIs instead of 200

U have to create one excel, 1st row will be columns ( Baseurl, endpoint, headers, file location, tagname1, tagvalue1, tagname2, tagvalue2 (these tags are nothing but once we get the response validation tag name is key and the tag value is value in the respective tag), etc
From the 2nd row, u should place ur 1st API details as per the above columns like that 10 rows or 100 rows
Note: make sure excel read utility and API Json utility already in place ur framework then only it’s possible or else takes time

Let’s say you have multiple windows open in the browser & you want to perform some action on X th window
Ans: Use Set & get the ids of all the open windows on the browser as the set always contains unique values & window ids are always unique. Set return an array containing all of the elements in the list in RANDOM sequence

Let’s say you have a list of checkboxes & you need to select the check box at X th position to continue the rest of the flow
Ans: Use ArrayList & then based on the index value of the check box at X th position perform the needed operation on the checkbox. ArrayList returns an array containing all of the elements in the list in a PROPER sequence.

  • We have decided to make an existing field from our web application available for our mobile application. This mobile application utilizes an API to communicate and store data within a shared database. While testing the mobile app you notice data was not stored within the new field upon saving. Please describe what your next step would be.
  • What is the command we use in selenium from switching one application to other applications, for example, if I am on Amazon and I want to switch immediately to Gmail or Facebook?
  • If I’d and XPath both are dynamic, which approach and strategy should be used ?
  • I have three drop-down I am using three different methods in all three drop-down. Now I want to create a single generic method for all three drop-down is it possible to create one. What could be the return type for the same?
  • There is a link on a webpage, click on That link a window will open, and now that opened window contains 3 different frames and you have to do the operation on different elements in 3 frames and come back to the window. how will you do this?
  • if there is an element that contains id attribute, that ID is split into two parts by ‘_’ (underscore), the first part is constant and the second part is changing. how do you find that element using id?
  • There is a submit button on the webpage and when that submit button is clicked, there is a number of windows launched. How to find the number of windows opened after clicking submit button?
  • You have been asked to help implement a CI/CD pipeline of your choice for the Instagram app. Assume the app is hosted in the cloud on a TEST and PROD environment.
  • What does your essential CI/CD build pipeline(s) look like?
  • What causes the build pipeline(s) to start?
  • Briefly describe each step in your pipeline. Which actions are executed?
  • I have a web table with 10 rows and 10 columns, in that table, u need to click on Ur name which is present in one cell..here catch is.. every time u refresh the table, cells will get changed, and the position of the cell in which my name is there also changes. In such a case how to click on the element.
  • You have to automate 100 test cases. How you will give an estimation for that. Tell us your approach.
  • Your search for products in Flipkart and sort from Low to high. How will you make sure, o/p is sorted or not.
  • Write a script in selenium/Java or automate the following scenario:
    1) Open Facebook, Gmail, and LinkedIn in the browser in separate windows in the same order as mentioned.
    2) Now log into Facebook with the user name and password
    3) Log in to Gmail with the user name and password
    4) Log in to LinkedIn with the user name and password
  • How to handle dropdowns in selenium without using a select class?
    Ans: Get the XPath of the drop-down location
    1. Then you will get the list of elements
    2. Iterate list elements
    3. Get text
    4. Write if else
    5. Once you get the value that you want to enter break the loop
    6. Quit the browser

Scenario Based Interview Questions for Freshers

  • If you need more time to complete any task and the given time is very less what will you do as a tester?
  • You have 20 bugs and you need to fix it as well as u need to run regression and you are only 2 people in a team how will you do it and which one you will give priority?
  • If some function is working in testing environment and same is not working in production what will be you approach?

Scenario Based Interview Questions for Test Lead

  • Describe a time when you had to deal with an angry client.
  • Do you think team members should take any responsibility for problems in the project? What would your advice be if one of them failed and caused harm? If so, under what circumstances might this issue arises and how do we avoid it ? How well prepared will each member feel about their roles after working on such a self-managed team all year ?
  • Which skills and qualities do you think a person needs to be a good member of a team?
  • Please explain in short about your role when the project got delayed for an unexpected reason, which was not covered by our date commitment scope ?
  • Describe situations when you encountered problems working with people from other countries/cultures during your employment experience so far? How did you handle it in such situation?’How would have been the outcome if you couldn’t to solve the problem effectively?
  • How would you describe your work style to others?
  • Please tell me, what were your tasks in previous job ? What projects did you manage or do technical leadership within that project(s).
  • How do you handle your conflicts with management/higher-ups of the company ? What methods employed to solve them and how successful can be a result?
  • Describe a project update meeting, What will describe, presentation style presentation on new techniques/tools of presenters , what was discussed in it by individual team members during there conference call etc . Understand that your turn is not until 5 minutes.

Scenario Based Interview Questions in Java

Question 1) string=”Hi Softwaretestingo User”;
Expected Output is = “resU ognitseterawtfoS iH”;

Question 2) Make pair which out of sum value is 25; (1 15 21 13 10 4 12 24)
Expected output is = (10 15) (21 4) (12 13) (24 1)

Write a code (any language you are proficient in) such that when passed two arrays of names, it will return an array containing the names that appear in either or both arrays. The returned array should have no duplicates.
For example, Input : Array 1 – {‘Ava’, ‘Emma’, ‘Olivia’} & Array 2 – {‘Olivia’, ‘Sophia’, ‘Emma’}
Output: should return an array containing Ava, Emma, Olivia, and Sophia in any order.

Write a code (any language you are proficient in) to check the biggest palindrome in a given array.
For example:Input: Array – {aaa, aba, adda, acdea, aeda }
Output: The biggest palindrome is adda

Return the sum of the numbers in the array, except ignore sections of numbers starting with a 6 and extending to the next 7. (every 6 will be followed by at least one 7). Return 0 for no numbers.
Ex1: [1, 2, 2] → 5
Ex2: [1, 2, 2, 6, 7] → 5
Ex3: [1, 1, 6, 7, 2] → 4

Given an array of ints, return true if every element is a 1 or a 4.
Ex1:([1, 4, 1, 4]) → true
Ex2:([1, 4, 2, 4]) → false
Ex3:([1, 1]) → true
Ex4:([4]) → true

Let’s say you have to store Global information like URLs, Default Username Password, Env details
Ans: Use Map & store the data as Key and value i.e. URL: www.xyz.com & Map returns the value associated with keys.

Scenario Based Interview Questions and Answers

Scenario Based Interview Questions From HR

  • How do you handle a difficult situation?
  • What is your greatest weakness?
  • What are your strengths and weaknesses as a leader?
  • Describe the most challenging work experience you’ve had in the past year.
  • How would you describe yourself as an employee?

Scenario Based Interview Questions in SQL

Questions will be added

    Filed Under: Interview Questions

    Reader Interactions

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    Primary Sidebar

    Join SoftwareTestingo Telegram Group

    Categories

    Copyright © 2022 SoftwareTestingo.com ~ Contact Us ~ Sitemap ~ Privacy Policy ~ Testing Careers