Browser Stack Testing Interview Questions
Guys Welcome to another post of SoftwareTestingo, where we are regularly sharing the Browser Stack latest interview questions, interview experience, and other updates regularly on various testing-related topics and tutorials on Selenium & Java tutorials.
Browser Stack Interview Questions
- How will you fetch test data from Excel Sheet in Parallel Testing in Data-Driven Framework?
Ans: In data provider, we should declare parallel=true and in xml, we should declare data-provider-thread-count=<number of threads>
- How to define driver in Parallel Testing when using Parallel Keyword in TestNG XML file?
Ans: You should declare webdriver in threadlocal.
ThreadLocal<WebDriver> driver = new ThreadLocal<WebDriver>();
Then set driver.set( new ChromeDriver()); it keeps a copy of the webdriver instance for each thread so that the driver instance stays unique and does not overwrite when running parallel.
- How to maintain URL links of different Environments(like – Dev, QA, PROD, etc) while designing Framework
Ans: You can maintain properties or json file and call the URL based on the environment.
- What is the major drawback of Data-Driven Framework?
Ans: Let’s assume you are automating a regression pack for a flight booking then you will have to try various types of bookings but have to traverse through the same page then a data-driven approach may be better in another case you have included left nav menu in all pages, in that case, data-driven approach may not be the right choice or you are trying to automate the small change made in sprint so data-driven may not be the choice so according to me using data-driven in the wrong scenario is the bad approach. Another thing is if you have 10 data to iterate and the 5th set of data failed then retry has to start from the beginning