Douyin software test interview questions (with answers)

Douyin software test interview questions (with answers)

topic

1...Can hidden or display = none elements in selenium be located?
2...How to improve the execution speed of selenium script?

3. What is the protocol of webdriver?

4. Is it necessary to connect to the database for data verification during automated testing?

5. After clicking the link, will selenium automatically wait for the page to load?

6. What do you think of the output ratio of automated testing?

7. How to judge that an element must exist in selenium?

8. What is the difference between http interface and webservice interface?

9. What is the difference between Pytest and unittest?

10. On the resume, if you are familiar with linux commands, you must ask, how to build a test environment? ! ! ! ! ! ! ! ! ! ! !

11. Is your test system connected with other systems? The allure test report output by your web automation, is there any

12. Briefly describe the inner connection and outer connection?

13. Who prepared the performance test data?

14. Has APP automation been done? Briefly describe how you do functional testing, performance testing, security testing?

15. Web automated testing found a BUG. The developer thought it was not a problem with the code, but a problem with your script. How to troubleshoot and convince him? (This question was asked three times by different interviewers)

16. What is the business process of your company? What do you think is the advantage of you coming to our company for testing? you are better at

What? Name your strengths? and your disadvantages?

17. If you come to our company, how will you carry out the testing work?

18. You have encapsulated the requests request library, how to get the corresponding message after sending the request?

  1. How do you analyze and locate the problem when the interface is abnormal

  2. How can the testing process be improved? (Because the resume is written, so you should not be able to ask this question)

  3. Are you doing automation full-time? Do automation and functional testing run in parallel? What is the proportion?

Answer

  1. seleniumElements in hiddenor display=nonethat can be located, but not interacted with. These elements can be displayed on the page by modifying styles or attributes through JavaScript, and then manipulated.

  2. Improving the execution speed of seleniumscripts needs to start from the following aspects:

    • Reasonable use of waiting time: set an appropriate waiting time, and avoid unnecessary hard waiting;
    • Reduce the number of page element positioning: reuse the positioned elements as much as possible to avoid repeated positioning;
    • Choose a fast positioning method: Choose an appropriate element search method (such as ID, class name, etc.) according to the application scenario, and avoid using slower positioning methods such as Xpath.
  3. webdriverIt is an open protocol that defines a Web API for browser control and automated testing, including managing different sessions through HTTP requests, obtaining the current state and characteristics of a specified session, and performing DOM operations through commands, etc.

  4. It is not necessary to connect to the database for data verification. In many cases, data validation can be done based on the concept of front-end and back-end interfaces without directly connecting to the database. Even if you want to verify the data in the database, you can use technologies such as JDBC or ORM to encapsulate the verification operation into the code instead of directly operating the database.

  5. seleniumYou can use ExpectedConditionsto wait for the page to be loaded or a specific element to be loaded, for example, presence_of_element_locatedto wait for the link element to be clicked to exist. In addition, you can also use methods time.sleep()such as to wait manually, but this method cannot distinguish whether the page is actually loaded, so it is not recommended.

  6. The output of automated testing depends largely on factors such as the quality of test execution and system complexity. If a variety of application scenarios can be fully considered and the solution can be continuously optimized for various situations, it can greatly reduce the cost and time of human testing, and output repeatable and sustainable high-quality test results. However, these factors may be ineffective without a good test plan, test case design and selection of the appropriate test tool value chain.

  7. seleniumThe waiting conditions can WebDriverWaitbe ExpectedConditionsencapsulated by in the class, for example, presence_of_element_locatedusing visibility_of_element_locatedmethods such as or to determine whether an element exists.

  8. HTTP 接口The HTTP protocol is used for communication, while the SOAP protocol is Web Service 接口used for communication, usually need to use WSDL file to describe the interface definition. In addition, the Web Service interface has more functions and higher protocol overhead, while the HTTP interface is simpler and is usually used in scenarios such as lightweight services and data transmission.

  9. PytestIt is a more flexible and concise Python testing framework, which supports many advanced features such as modularization, parameterization, fixture injection, and plug-in mechanism. unittestis a testing framework built into the Python standard library, supporting features such as assertions, test suites, and more. In contrast, Pytestit is easy to learn and use, and has a richer plug-in ecology.

  10. To build a test environment, it is necessary to select and configure appropriate hardware and software resources according to specific needs. In general, a physical machine or a virtual machine can be used to simulate the test environment, install the necessary operating system, development environment, database and other components, and the application itself, and configure the required backup, recovery, load balancing and performance according to the test traceability scheme monitoring tools, etc.

  11. The test system usually needs to interface with other systems, including product management system, change management system, defect management system, etc. For docking requirements and interface specifications, specific docking logic and interface protocols need to be developed and maintained to achieve data exchange and process collaboration.

  12. 内连接(INNER JOIN)Is the simplest type of join in SQL, it returns only rows with matching key values ​​in the two tables. 外连接while returns rows that do not have a corresponding value in at least one table,

  13. The data set of the performance test is the test script written by the tester according to the system business scenario, and by running these scripts, the system performance data is collected under different load scenarios. Performance testing needs to cover various practical application scenarios and generate reasonable load and concurrency to reflect the performance indicators and bottlenecks of the system under different pressures.

  14. Have done APP automation function test, performance test and security test. Among them, the performance test mainly tests the APP functional modules, such as login function and payment function, etc.; the performance test mainly focuses on the response speed, memory usage rate and power consumption of the APP, and collects and analyzes the operation indicators through tools; while the security test is Mainly focus on attacks against APP, such as cross-site scripting (XSS) and SQL injection, etc., and test whether the degree of reinforcement and vulnerability repair are effective.

  15. If the developer thinks that the BUG is caused by a link other than his own code, he can use the following methods to troubleshoot and convince the developer:

  • Rerun the script to check for consistent errors;
  • Check the configuration and setup of the test environment and make sure it is similar to the production environment;
  • Troubleshoot all middleware components affecting the code execution process, try to remove any of them or adjust their configuration to determine the solution;
  • In the same scenario, use different testing frameworks or use non-automated testing methods to verify whether the bug is only related to scripts;
  • Carefully analyze the business and code logic and discuss with the development team and products to quickly locate the root cause.
  1. The company's business process is related to the industry, and the advantage of me doing testing in your company is that I have certain experience and skills to deal with various software testing problems, including writing test plans, designing test cases, executing test work, and proficiency in Some common testing tools and techniques are introduced. I am relatively good at automation testing, performance testing and interface testing, and I am also trying to improve other skills to meet the needs.

My strengths are a high sense of responsibility and learning ability, and I am good at cooperating with various people. My disadvantage is lack of project management experience, and I may need more training and support when undertaking some complex projects.

  1. When testing in a new company, you first need to understand the company's software development process, project planning, and testing standards, and establish contact and communication with development, product teams, and other relevant personnel. On this basis, you can start the test plan, write test cases and scripts, and debug and build the test environment. According to the needs of different projects, automated testing, manual testing or mixed testing can be used to carry out testing work, and timely track defect reports and participate in relevant meetings.

  2. After encapsulating the requests library, you requests.Responsecan textget the response message string through the object's property after sending the request. The data after processing and parsing the corresponding message can also be obtained through contentattributes or methods such as .json()

  3. When an exception occurs on the interface, the following analysis methods can be adopted according to the actual situation:

  • Analyze abnormal information, such as HTTP status code, error message, etc.;
  • Select appropriate test tools according to the network environment and test scenarios;
  • Add detailed logs to the test code to record key steps and trigger operations;
  • Other APIs or monitoring programs can be called to track and analyze the whole link.
  1. In order to improve the testing process, you can start from the following angles:
  • Review and update test plans and test cases, and try to use automation software and test frameworks to improve test efficiency;
  • Set specific quality indicators, including code coverage, defect density, etc., and ensure that the final product has the desired quality requirements through continuous integration and continuous delivery;
  • Work with developers and generally participate in the development process to catch issues at an early stage;
  • Use agile development methods to be able to respond quickly to changing requirements and to make feedback and fixes quickly.
  1. At present, I am doing full-time automated testing, but I will choose the type of test, design and execute the test case according to the actual situation of the project and the team. At the same time, I am convinced that automated testing and manual testing go hand in hand and have their own advantages. In my testing work, automation accounts for a large proportion and the effect is significant, but it cannot completely replace manual testing. For example, scenarios such as testing GUI and corner use cases still require human participation and inspection.

Guess you like

Origin blog.csdn.net/qq_51447496/article/details/131141833