自動化測試架構師(技術專家)面試100+題
對於有志要朝向自動化測試技術專家或是測試架構師發展,
筆者建議透過不同專案上的歷練累積經驗,
這篇文章廣泛的列出關於自動化測試的實務與面試考題,
可以透過這 100題客觀的自我檢視,自我衡量還有哪些主題可以繼續專研。
技術專家與架構師
未來會有越來越多 “技術專家” 或是測試”架構師”的需求,
因為軟體發展的複雜度,因為技術成長的驅動都需要技術專家與架構師,
因此許多公司,特別是大型有規模的公司都會有雙軌制,管理職或是技術職的發展方向,
針對自動化測試架構師 or 自動化測試技術專家需要懂哪些呢?
這篇文章舉 100+面試與實務考題,供讀者客觀的自我檢視。
紅色是筆者認為更普遍與常見的題目,不管在實務上或是面試上。
如果不會回答時,可以試著回覆…?
不會回答分為幾種情況
情境1. 知道但是沒有用過
例如,”Selenium RC”,知道但是沒有用過。其實非常常見與正常,
( Selenium RC的架構是上一代的架構,已經過時)
這種情況可以說明:
- 自己的 Selenium RC的認知
- 為什麼不採用 Selenium RC的原因
- 進一步說明自己會採用的架構或是建議的架構為何?
情境2: 大概知道但是沒有用過
例如:ClickAndWait 與WaitFor的差異?
這種情況可以說明:
- 特定指令使用的差異我可以查一下技術文件,如果可以會後再寄相關參考資料給您?
- (接著試著將問題再拉高一個層次回答)
- 如果我的認知沒有錯誤,相關 “wait”的處理,主要解決的問題是 ……..
- 為了解決自動化測試 ……的問題,所以通常會使用 ……..,我的經驗是……..
- 建議這樣的情況……..可以採用 ………..
情境3: 完全沒有頭緒
如果真的沒有頭緒怎麼辦?
例如:請問 “Page Object”您的使用經驗?
- 可以據實回答使用經驗。”我並沒有使用過 Page Object,但是我相信我或許用其他方式來解決問題。如果可以,可否交流與請教團隊上目前使用 Page Object主要要解決的問題領域為何?”
這篇不是要強調將自己不會的變成會的。
這邊要強調的是如何進行進一步的交流。而不只是單純的回答 “我不知道”
據實回答自己的使用經驗與認知來做交流,當作是一場技術交流之旅也是一種學習。
Selenium的綜合性認知
- What do you know about Selenium? How long you are working with Selenium and what version?
- What are the technical challenges that you faced with selenium?
- What are the test types supported by Selenium?
- Does Selenium support mobile internet testing?
- Does Selenium support Google Android Operating System? What mobile devices it may support?
- What is Selenese?
- How do you connect Database from selenium?
- What test can Selenium do?
- What is difference between QTP and Selenium?
- What are the types of text patterns available in Selenium?
- What are the disadvantages of using Selenium as testing tool?
- How do you handle the secured connection error in HTTPS?
- List the browsers, OS supported by the Selenium
- Does selenium support flex? How does it understand those objects?
- When you have selenium issues, what approach you take to resolve it?
- What langugaes are supported for the selenium development?
- Name 5 different exceptions you had in selenium webdriver and mention what instance you got it and how do you resolve it?
- How will you execute your login script using chrome browser from your editor using selenium?
- How do you create html test report from your test script?
- How do you manage the code versions in your project?
- What are the other tools that you have used to successfully implement selenium in your project and for what as well?
- Have you worked in Maven, Junit, TestNG?
- How to use regular expressions in Selenium?
- I like to know all the methods supported in webdriver and its syntax. Where do you think you can find it?
Selenium IDE 的使用
- What are the capabilities of Selenium IDE?
- What are the challenges with Selenium IDE?
- Which are the browsers supported by Selenium IDE?
- How to execute a single line command from Selenium IDE?
- How to insert a break point in Selenium IDE?
- How to debug the tests in Selenium IDE?
- How to export the tests from Selenium IDE to Selenium RC/WebDriver in different languages?
- How to export Selenium IDE Test Suite to Selenium RC Suites?
- Which is the command used for displaying the values of a variable into the output console or log?
- What are the limitations of Selenium IDE
- Which wildcards does SIDE support?
- If a Selenium function requires a script argument, what would that argument look like in general terms?
- If a Selenium function requires a pattern argument, what prefixes might that argument have?
- What is the difference between an assert and a verify with Selenium commands?
- Difference between waitFor and pause commands ?
- How to take snapshot using IDE?
- How to pass data when rerunning scripts in IDE?
Selenium RC 與 Selenium WebDriver
- What is Selenium RC?
- Why Selenium RC is used?
- Which are the browsers supported by Selenium RC?
- How to configure Selenium RC with eclipse to run Junit Tests?
- Which is the command used for running the Selenium RC Server?
- How do you run selenium commands in slow motion in Selenium RC?
- What is the difference between Thread.Sleep() and Selenium.setSpeed()?
- What are the challenges with Selenium RC test suites when running in JUnit?
- Can we handle pop-ups in RC ?
- How will you find a specific text available in a page?
- How does webdriver identifies UI Elements?
- What tools – do you use to identify the Xpath?
- How Selenium Grid works?
- What are the capabilities of Selenium WebDriver ?
- What is selenium Server default port number?
- What is new about Selenium 2 vs Selenium 1?
自動化測試的一些個案情境
- How do you select second value from a drop down menu ?
- Which Selenium command(s) simulates clicking a link?
- How to scroll the webpage using webdriver?
- How to set focus on an object?
- Write a sample code to run a javascript using webdriver code?
- How to find the present URL on the application?
- How to find the number of browsers opened by selenium?
- Write a sample code to forcibly close all open browsers
- How will you simulate a keyboard action using webdriver? Write a sample code to perform browser refresh
- Difference between click and clickandwait statements?
- How to run the selenium webdriver scripts in the background? Write a sample code to perform that action.
- I am getting “Unable to bind to locking port 7054” . What does that mean?
- I have a hidden webelement in a page and like to get the static text. How to do that?
- How do I know when a page has finished loading?
- How do you handle secured connection error in HTTPS ?
- Does WebDriver support file uploads?
- I got an unexpected pop up error in my screen, how will you handle in your script?
- Have you worked in Ajax? What kind of challenges you have faced during web Ajax and how did you overcome?
- How to click an element which resides in a frame? Sample code pls
- Desired capabilities and Actual capabilities – What are the differences and how do you use them?
- I have to find the color of a specific text. How can I do that?
- I need to find each href of all links in a page. How do you do that?
- Difference between webdriver and remotewebdriver?
- How will you handle the untrusted SSL certificates?
- I have a table with 8 rows and 4 columns and I need to read all data from the table. How will you do?
- I have menu -> menu item -> child menu item and all works by the mouse over. How will you perform the operation?
- I like compare images between 2 browsers. How will you do that?
- Write a program tp find the count of number of edit fields in a page.
- When running in hub, I have set my desired capabilities for my script to run in IE 8 and but there is no exact matching capabilities. What will happen?
- I like to drag drop several data from one place to another. How shall I do that?
- When I start my firefox driver, I like to have the home page is loaded as my project URL . How do I do that without using
get method?
自動化測試進階主題?
- Difference between implicit and explicit wait. When will you use what?
- Have you worked in Page Factory? When did you use it?
- How will you identify the ip address of the machine that is running your specific script in selenium grid?
- Write selenium webdriver code to kill the browser when it is not responding?
- How will you perform mouse click using htmlunitdriver?
- I have 2 firefox versions in my machine. Write a code to open the older version of firefox in my machine?
- Write a code to know if there is a valid chrome installed in a specific machine?
- How to get the page source using webdriver?
- Write webdriver code to resize my browser to full screen?
- How will you compare objects size between 2 different browsers say firefox and chrome?
- I have to fetch a data from IE and copy that text in chrome browser. How will you do that?
- When i start my driver script, I wish to do the following in pre-script.. how do i do that?
- Close all browsers
- Clean up all cookies
- Delete my registration data that i will use in my database
- Create a new report for today’s date and time folder
- Launch my application
自動化測試的環境準備
- Given that i have 4 parallel execution of 300 scripts in all; these browsers and OS, how will you plan that action.
- OS – MAC, Linux, Windows
- Browsers – Chrome, Firefox
- Not more than 2 browsers at a machine.
- Write a method to find the hours, mins and seconds from seconds
g. 3665 should return output 1 hr 1 min and 5 seconds - Write a simple method for addition?
- Write a code to create a new xls with 2 sheets by name “Sheet 1” and “Sheet 2” write a code to fetch the data from xls on column 8, row 3
- How will you read a pdf content and confirm the data matches that in the web page?
Why is Java platform/OS independent ?
自動化測試的特殊情境處理
- Have you used collections in your code ?
- What is the difference between Implicit and Explicit wait ?
- Write any sample code — Fibonacci series …
- I have three unique buttons in my page.(Display names are different). The internal ID & Name changes on every page load. I need to click on each button in sequence.
- What is This keyword? Have you used in your code.
- What is Interface?
- Diff b/w Interface & Abstraction?
- About Static ?
- how to call static method?
- how to click the 6th element in webpage – webdriver, but elements not in one frame…
- how to handle alerts
- code to retrieve data from excel
- code to take snapshot
- I need to click on each button in sequence. How?
- How to perform ‘Right click on a web page’ and get “page source”
- I like to know all the methods supported in webdriver and its syntax. Where do you think you can find it?
- How to identify the color of the text using selenium web driver?
- If a Selenium function requires a pattern argument, what prefixes might that argument have?
- I need to Crap all the content for all Tag , how do i get only the content values from source page. Please execute below code you ill get the all HTML source but i need only content of ll tags. how can i get it ?
- When you want to use mouse X,Y coordinate function?
- What kind of Frame work using in your organization..?
- Explain about your framework architecure..?
- . Where did you stored all kind of xpaths in your framework..?
- . What is the HUB & Node..?
- . How do you run your test using a framework..?
- . Write the xpath..?
- . How to handle alerts using web driver..?
- How to identify two fields(Radio button) in a page with same id..?
- . How to write a xpaths for Dynamic web pages..? (like facebook status, Filpakarts)
- . Junit – how do you used in projects..?
- How do you handle popup windows in your projects..?
最後…
可以看到這裡的讀者表示您對自動化測試有一定的熱情,
必且是現職的測試架構師或是有心想要朝向這個目標發展,
如果對上述的問題想要了解或是交流歡迎留言給我。
是不是要全部回答才能勝任測試架構師? No!!
自動化測試的領域很廣,上述的問題技術集中在於 Selenium + Java的解決方案,
再進一步跳脫這個技術,再往上一層概念性的思考,更重要的是為什麼選用這樣的技術?
選擇 Selenium + Java 不選擇其他技術的原因跟限制為何?
這些是筆者認為更重要的,而不是被這些技術牽著走。
工具技術會改變,但是這個專業領域試圖要解決的問題核心不變。