2021 Desperately Recorded Automated Software Testing Interviewer Must Questions (including answers)


Python automated test interview questions

1. Questions

1. What design patterns are used in the automation code?

Answer: Design patterns used in automation code:

①Single case design pattern

②Factory model

③PO design mode

④Data-driven mode

⑤ Interface-oriented programming design mode

2. What is Selenium

Answer: Selenium is an open source web automated testing framework that supports multiple programming languages ​​to develop automated test scripts and supports cross-browser platform testing

3. What are the annotations in TestNG?

答:@Test,@BeforeSuite,@AfterSuite,@BeforeTest,@AfterTest,@BeforeClass,@AfterClass,@BeforeMethod,@AfterMethod,@DataProvider

4. What is an assertion?

Answer: Assert Assert is used to verify whether the actual result meets the expected result in the code. If the test case fails to execute, an exception will be thrown and an assertion log will be provided

5. What are the advantages of TestNG?

Answer: TestNG's annotations are very powerful and convenient. TestNG allows parallel testing, and can execute tests based on groups. It can also generate test reports and display diversified reports. You can develop test report plug-ins and test listeners on its own.

6. What is web automated testing?

Answer: Web automated testing refers to automated testing from the UI (user interface) level. Testers use the degree of programming automation (test case scripts) to open the browser to test the business logic of the website

7. Write the interface or class you are most familiar with in Selenium?

答:webDriver、lnternetExplorerDriver、FirefoxDriver、ChromeDriver、WebElement、WebDriverWait、By

8. What are the types of element positioning?

Answer: There are 8 element positioning methods in the By class, and they are all static methods:

By.id(),By.name(),By.tagName(),By.className(),By.cssSelector(),By.linkText(),By.partialLinText(),By.xpath()

9. Is there any other way besides the click method to click the login button?

Answer: You can also use the submit() method, provided that the type of the input element is submit

10. How to automate the test of the function containing the verification code?

Answer: 1) Image recognition is technically difficult and the effect is not good, so it is not recommended

2) Shield verification and invite development and processing, but it is not recommended in pre-production or production environments

3) Universal verification code, use a verification code that cannot be guessed by others in charge

11. How to verify whether the check button is selected?

Answer: You can use the isSelected() method of the element. If it returns true, it means it is selected, otherwise it means it is not selected.

12. How to deal with alert pop-ups?

Answer: To process the alert pop-up window, you need to jump to the alert first, and then click the OK or Cancel button,

Alert alet=driver.switchTo().alert();//Switch to alert

alert...accept();//OK

alert.dismiss();//Cancel

13. How to use webdriver to right-click with the mouse?

Answer: Use the Actions class

Actions actions=new Actions(driver);

actions.moveToElement(element).perform();

actions.contextClick().perform();

14. Give an example of method overloading in webDriver?

答:frame(string nama),frame(int index),

frame (WebElement element)

15. How to select a menu item in the drop-down menu?

Answer: If the drop-down menu is the select tag, how to use it:

selectByValue() or selectBylndex() or selectByVisibleText()

If this drop-down menu is not created through the select tag, locate the element directly through xpath and then click to select

16. What is the execution strategy of your automation use case?

Answer: Automated testing and software development are essentially the same. Automated testing tools are used to design automated testing tools after testing requirements.

Test cases to build an automated testing framework, design and write automated scripts, verify the correctness of the test scripts, and finally complete

Create automated test test scripts (ie application software whose main function is testing) and output test results

Do I need to connect to the database for data verification during automated testing?

Data verification from the database level can more easily verify whether the data processing of the system is correct. After the data processing logic is normal,

Verification at the UI level also needs to be done.

17. Which attribute do you prefer most for id, name, class, xpath, css selector, and why?

Answer: almost all elements of css and xpath can be located, but their shortcoming is that it is easy to change the position of the element on the page

Change, so the first thing to use is id or name.

18. What are the common serious problems in APP testing? What are the reasons for each?

Answer: Crash, ANR (application unresponsive, stuck) are common, which are generally caused by equipment fragmentation, large network fluctuations, memory leaks, and generation

Coding error

19. What kinds of environments are there for app testing?

Answer: Local environment: The mobile phone environment where the app is installed and the automated test environment built by the computer (such as Android SDK, etc.).

Server environment: The server deployed by the war package. The server can be accessed through a browser or an app. (access

Is the interface of the web program)

20. Briefly introduce the installation steps of Android SDK:

Answer: download jdk and android sdk

Install jdk, configure environment variables (java_home, classpath, path)

21. When an interface is abnormal, how do you analyze the abnormality?

Answer: First capture the package, use the fiddler (charles) tool to capture the package, or the F12 debugging tool on the browser; if it is on the APP, then use

Fiddler acts as a proxy, through the mobile phone to set the proxy to see the request and return message;

Check the back-end log. For example, if the Linux system connects to the server through xhell, check the interface log to see if there is any error message (command: tail-

f log file);

22. How to analyze whether a bug is front-end or back-end?

Answer: When we usually mention bugs, front-end development and back-end development are always arguing, not admitting that it is the other's bug.

This situation is easy to judge. First, grab the packet and look at the request message, and look at the interface document to see if there is any problem with the request message.

The data is wrong.
Insert picture description here
I am a test lady in the workplace! Just finished the automated testing tutorial, I will share it again. Testers who are interested in python automated testing, web automation, interface automation, mobile terminal automation, interview experience exchange, etc., can follow the WeChat public account:[Sad Spicy Strips], Obtain the interview information of the software test engineer from Dachang! My learning exchange group: 902061117 group has technical experts to communicate and share together~

If the article is helpful to you, please reach out to make a fortune and give me a like. Thank you for your support. Your likes are my motivation for continuous updating.

Recommended reading:

What kind of person is suitable for software testing?

Talking about starting from a small company to a big factory, what did I do right?

Want to switch to software testing? Come and see if you are suitable

From self-study to work in software testing, how should software testing learning be carried out?

How to write a software test engineer resume project experience?-1,000 software test engineer resume templates (real resume) that have been successfully recruited

Guess you like

Origin blog.csdn.net/weixin_50271247/article/details/115269627