Exploratory Testing常見的Q&A

Exploratory Testing challenged - Part I
http://shrinik.blogspot.com/2007/12/exploratory-testing-challenged-part-i.html

2007 Dec 29
Published in Thinking Tester

1. Exploratory Testing (ET)的好處是什麼?
Ans:
ET will extend the test coverage over traditional scripted testing, you will be able discover those bugs that are not “catchable” by scripted tests.

2. 為什麼Scripted Testing無法找到所有bugs?
Ans:
- Our scripts are based on specifications which are one narrow, fallible source of information about “intended software behavior”.
- Since specifications are written in English – there could interpretations/misinterpretations. Since our  specifications are fallible, so are our scripts.
- There is a human limitation to understand and interpret specifications (objectively) and design the test cases that cover the entire test space.
- So, there is good possibility that scripts will not find all bugs that potentially be discovered.

3. 為什麼test cases為什麼被執行多次後, 越來越沒有用處呢?
Ans:
- The scripted approach to testing attempts to mechanize the test process by taking test ideas out of a test designer's head and putting them on paper.
- Test cases wear out as they do not have any in built mechanism in them to alter themselves to changing product environment.
- Test scripts can not think, infer, improvise, get frustrated as intelligent human testers do. Hence test scripts can not find bugs that repeatedly than a human tester.
- But exploratory testers take the view that writing down test scripts and following them tends to disrupt the intellectual processes that make testers able to find important problems quickly.

4. 那Ad Hoc Testing和Exploratory Testing是相同的東西嗎?
Ans:
- Yes as Adhoc testing is well known predecessor to ET. Cem Kaner coined this term ET around early 80’s to distinguish ET and Adhoc Testing.
- Cem thought that there were lots of confusions regarding some kind of “impromptu” testing that does not rely on predefined scripts.
- Ad hoc testing normally refers to a process of improvised, impromptu bug searching. By definition, anyone can do ad hoc testing.
- The term "exploratory testing"--coined by Cem Kaner, in “Testing Computer Software” -- refers to ET as a sophisticated, thoughtful approach to ad hoc testing.

5. 聽說 ET要求要有經驗, 並且Domain knowledge要高. 那average tester可以做好ET嗎?
Ans:
- I believe, ET requires skills like “questioning”, “modeling”, “critical thinking” among others.
- Domain knowledge certainly helps in ET but I do not consider it as mandatory.

6. 那ET可以找到什麼種類的bug?
Ans:
- It depends upon what kind of bugs you want to discover.
- ET can be performed in controlled, small time boxed sessions with specific charters to explore a specific feature of the application.
- ET can be configured to cater to specific investigative missions.
- You could use few ET sessions to develop a software product documentation or to analyse and isolate performance test results.

7.
當你有5000 test scripts, 你執行1到2的cycles, 你就從目前的test script再也找不出錯誤了. 你會不會覺得這系統已經沒有問題了?
或者你找到的bug都不是從這些test scripts中發現的, 你會不會覺得這test script有問題?
如果你還要在執行5 個test cycles, 你會全跑這些test script或是怎麼做呢?
Ans:
Shrini沒有提到答案, 但是已經暗示我們scripted testing是不夠的. 或許你的Testing Manager或是其他的Manager 無法被說服去採去ET, 但是你自己內心深處, 一定知道scripted testing無法解決所有問題

這時候大師出馬了, Cem Kaner 說
I rarely try to persuade a test manager to switch to exploratory testing.
Instead, I recommend to them that they include some exploratory testing in their regular testing process.
Over time, a thoughtful manager will find a context- appropriate balance between scripted and exploratory tests.

這裡他提出一個經驗法則, 告訴你要如何混搭ET 和ST
In every build, even the last build:
- spend 25% of your time trying new things. Some of these will find bugs. Some will give you good ideas for reusable tests.
- spend 25% of your time implementing new tests as reusable tests.
- spend 50% of your time running old tests (including bug regressions).

這個經驗法則有個問題: 花太多時間在做test execution, learning的時間不夠多
 -Learning is a very big part of exploration, and that doesn't come just from running tests and seeing results.
- It comes from finding information about the market, the platform, the customer expectations, the risks for similar products, etc.
- This learning guides initial test design (the 25% for new things) and the design of the reusable tests.
- It also provides important guidance for writing bug reports (helping you decide, and explain) whether a bug is serious and what customer reactions might be.

不過對於一般的manager來說, 這個經驗法則的好處是: it is very easy for many managers to understand and try.

壞處則是:
- It hides the non-test-execution research that competent explorers must do -- is a serious problem.
- If you are the consultant, then as your client gains experience with exploratory work, you can raise higher level cognitive issues and the value of preparatory research gradually, as examples present themselves in the situation of your client.

kojenchieh 發表在 痞客邦 留言(0) 人氣()

Don't Work
http://blog.abakas.com/2008/11/doesnt-work.html

每次我在做bug review, "Don't work"是我最怕看到的. 因為這句是沒有太多意義的, 而且會讓人家覺得我們家的QA不夠專業.

作者提到當看到don't work可能代表這些意義
1. Pretty unlikely.
- For all we tease developers sometimes, it's pretty darn rare for a feature to not work at all under any circumstances.

2. Antagonistic.
- Congratulations. You've basically accused the implementors of totally screwing up, quite possibly on
purpose.
(RD和QA之所以會互相看不順眼, 這些地方都是導火線)

3. Really hard to do anything about.
- What exactly is actionable about that statement? What are you expecting the person to do?


所以當你在寫下don't work 之前, 你要先好好想一想, 確認你是否有做到下面幾件事
1. Being polite.
2. Being precise about what you did and what you saw.
3. Expressing a desired action, whether its a fix or some help tracking the issue down, or just a sounding board for a rant.

請記得, 專業的人要有專業的行為, 不要再讓我看到 don't work了!!

kojenchieh 發表在 痞客邦 留言(0) 人氣()

Bug Verification Checklist
http://blog.abakas.com/2008/10/bug-verification-checklist.html

Verifying  bug是QA一定會面臨的情況, 但是它不是一件容易做的事情. 套一句周星馳獎的話, 這種事情是很講天份的. 有些QA只是很單純的, 照本宣科的重新跑一次. 有些QA卻能找出RD是否真正解掉它, 是否會有side effect.

作者提出他自己的一些經驗法則
1. 確定我所run的build有包含修正的程式碼
- In particular when there are a number of branches this is something that needs double-checking.
- Rely on check-ins and build tags for this, not on bug comment time stamps.

2. 重複產生問題的步驟, 確認會產生我想要的結果
- This is the obvious part. I try the thing that broke before and see if the behavior has changed.
- If there's zero change in behavior (i.e., the exact same thing happens), I'm really suspicious - after all the fix attempt is likely to have at least modified the system behavior, even if the fix is complete.
不要認為這個步驟很簡單, 有時候當bug的reproduce 步驟很複雜時, 要能很準確重建原始狀況很不容易.
若是你當初你在找到bug時, 沒有很認真確認, 這時候你就會很痛苦.
或者像是一些hardly reproduce的case, 你更要花很多時間來確認是否真的已經被解決了

3. 確認所有的方式都能過關
- I can't prove this bug is resolved unless I can prove I exercised the thing that used to cause the bug.
我想這裡你需要知道root cause 是什麼, 否則你是無法找出所有的可能性. 因此我會強烈建議QA要去看RD所寫的解法或是root cause分析, 這不但讓你對受測系統更了解, 並且你也能再三確認這解法是否正確, 以及那些scenarios是要再加以驗證的

4. 找尋問題被解決的記號
- Often a bug fix will include a mark or a note that is a secondary way to know the bug was fixed.
- Usually this is in the form of a message that does appear in the log (XX complete) or that does not appear in the log (failure message "blah" does not appear).
- Look for the positive indicators of a fix - success message - in addition to the negative indicators of a fix - lack of prior error.
 
5. 重新再思考這個bug.
- Think I got it? Great.
- I'm going to read the bug one more time, start to finish, especially with a really long bug.
- Maybe the behavior morphed over time, or maybe there is a reference to another problem that sometimes hides this problem.
- Maybe there's a reference to some documentation change that should be opened as a separate request.
- Once this bug is closed out, it's unlikely to be read again, so make sure you get everything out of it that you need.


但是在時間的壓力下, 我也知道大部分的人, 都只是簡單的確認原先的scenario是否已經解掉了. 不過我想妳若是要更上一層樓, 成為不可取代的QA, 是要有所改變的.

kojenchieh 發表在 痞客邦 留言(0) 人氣()

成功和失敗的Test Automation的差別

The Difference Between Test Automation Success and Failure
Elisabeth Hendrickson
Quality Tree Software, Inc.
esh@qualitytree.com

這篇文章作者在討論, 成功和失敗的Test automation差在哪裡. 首先他先定義何謂失敗, 何謂成功.
什麼是失敗的Test Automation
‧ Wasted Time
‧ Wasted Money
‧ Inaccurate Results
‧ Demoralized Team
‧ Overall Reduced Productivity
‧ Lost Opportunity

什麼是成功的Test Automation
‧ Overall Cost Savings
‧ Improved Testing
‧ Shortened Software Development Cycle
‧ Reliable Results
‧ Process in Place for Future Success

接下來從Project的 level來討論, 她所經歷過的成功和失敗的project有怎樣的差別
(1). 領導階層的特徵
Failed Project
‧ Executives expected immediate payback.
‧ QA Manager had unrealistic expectations.
‧ Automation lead (me) inexperienced in leadership and automation.
Successful Project
‧ Different executives were open to having their expectations reset.
‧ Different QA manager with more automation experience.
‧ Automation lead (me) got a clue.

(2) Project對Test Automation的目標
Failed Project
‧ Stated goal: “Automate Everything”
‧ Unstated goal: “Reduce number of testers needed.”
‧ Goals not measurable.
Successful Project
‧ Stated goal: “Save manual testers time and improve testing coverage.”
‧ Unstated goal: “Reduce test cycle time.”
‧ Goals specifically designed to be measurable.

(3) 溝通狀況
Failed Project
‧ No consistent communication about project goals and status.
‧ Inadequate communication with executives.
‧ Inadequate communication with manual testers.
Successful Project
‧ Same detailed weekly status report sent to all. Status information available online at all times.
‧ Close communication with the VP of Development and Director of QA
‧ Verbal status reports delivered in weekly QA meeting.

(4) 自動化的準備程度
Failed Project
‧ Extremely limited test documentation; most testing ad hoc.
‧ No method of tracking test results.
‧ Testers lacked a strong understanding of how to test the product.
Successful Project
‧ Written test documentation. Each test case numbered individually.
‧ Test results tracked on spreadsheets that referenced the test case number.
‧ The test group as a whole had a much better understanding of how to test the product.

(5) Automated Testing Team的心態
Failed Project
‧ “Bulldozer builders vs. ditch diggers”
‧ Automators didn’t appreciate the value of manual testing.
‧ Manual testers felt threatened.
Successful Project
‧ Service organization focused on building tools.
‧ Automators understood that automation cannot replace manual testing.
‧ Manual testers more involved in the process and therefore less threatened.

從技術的觀點, 她所經歷過的成功和失敗的project有怎樣的差別
(1) Automated Test System 的架構
Failed Project
‧ Tool best-suited to creating individual scripts, not entire systems.
‧ Tool did not support creating a reusable library of functions
‧ No support for logical layer resulted in maintenance nightmare.
Successful Project
‧ Tool specifically designed to support creation of automation systems.
‧ Tool supported & encouraged creating a reusable library (“infrastructure”).
‧ Logical layer vastly improved portability & maintainability of scripts.

(2) Script Creation 的方法
Failed Project
‧ Primarily record & playback
‧ No automatic test case or test data generation
Successful Project
‧ Primarily data driven; record & playback used as a learning tool only.
‧ Used advanced features in the automation tool to support automated test data generation.

Note:
Good Script 設計要素
‧ Tests structured with setup, action, and result
‧ Tests are not order-dependent
‧ Test data is never hard coded
‧ Results are informative
‧ Pass/Fail determination is as automated as is practical

(3) Verification的方法
Failed Project
‧ Bitmap comparisons to verify both window existence & contents of window.
Successful Project
‧ Logical window existence functions to verify window appeared.
‧ Logical comparison between expected fields in window and actual fields.
‧ Test data verification

(4) Automation Programming Practices
Failed Project
‧ Automation standards focused on file naming conventions.
‧ Extremely limited code reviews.
‧ No source control; test script management done exclusively through tool’s management module.
Successful Project
‧ Automation standards focused on what constitutes good code
‧ Both formal & informal code reviews on a regular basis.
‧ Commercial source control system used.

作者在 Automation Management所學到的事情
‧ Set realistic goals.
‧ Measure your progress toward those goals.
‧ Communicate goals and status clearly and consistently.
‧ Don’t let your management set their expectations based on vendor hype.
‧ Coordinate with manual testers.

作者在 Automation Creation所學到的事情
‧ The right architecture can make everything else fall into place.
‧ Having the right tool for the job makes a difference.
‧ Simple scripts can be more powerful than complex do-everything scripts.
‧ Automation is programming: good programming practices apply.

kojenchieh 發表在 痞客邦 留言(1) 人氣()

Microsoft如何測試ASP.NET 2.0 and Visual Web Developer

Testing ASP.NET 2.0 and Visual Web Developer
http://weblogs.asp.net/scottgu/archive/2004/10/28/249458.aspx

很多應該都有興趣Microsoft如何測試他們的產品, 尤其是他們的主流產品. 可惜的是, 市面上不太容易找到這樣的資料, 即使有也都談的很淺.
這篇(2004的文章)是我很久以前找到, Microsoft如何測試ASP.NET 2.0 and Visual Web Developer, 我想很值得大家參考. 作者是ASP .NET的manager, 我想大方向上, 應該是可靠的資訊.
1. Team的組織架構
(1) Test的成員
- Our test team is staffed by engineers who own writing test plans, developing automated tests, and building the test infrastructure required to run and analyze them.  
- The job title we use to describe this role at Microsoft is SDE/T (Software Design Engineer in Test).
(2) 其他成員的組成
- All members of the test team report through a Test Manager (TM)
- Similarly all members of the development team and program management team report through a Development Manager (DM) and Group Program Manager (GPM) respectively.  
- The TM, DM and GPM are peers who report to a Product Unit Manager (PUM) who runs the overall product team (note: 作者就是PUM).
(3) RD和QA的比例
- We currently have approximately 1.4 testers for every 1 developer.
 
2. 為什麼test team要比development team大?
(1) We take quality pretty seriously at Microsoft – hence the reason we invest the time and resources.

(2) We also have a lot of very hard requirements that necessitate a heck of a lot of careful planning and work to ensure high quality.  
- different processor architectures (x86, IA-64, and x64 processor architectures),
- on 4 different major OS variations (Windows 2000, Windows XP, Windows 2003 and Longhorn)
- support design-time scenarios with 7 different Visual Studio SKUs, and be localized into 34+ languages

(3) Long maintenance period
- Making things even more challenging is the fact that Microsoft supports all software for at least 10 years after the date of its release
    > which means that customers at any point during that timeframe can report a problem and request a QFE fix.  
- We’ll also then do periodic service packs (SPs) rolling up these fixes during these 10 years as well.
 
3. What is our process for testing?
(1) 基本上分成三個重要的階段
a. We build detailed test plans that comprehensively cover all product scenarios
b. We automate the test scenarios in the test plans to eliminate the need for manual steps to test or verify functionality
c. We build and maintain infrastructure that enables us to rapidly run, analyze and report the status of these automated tests

(2) Test Plans
a. Test Plan 的內容
- Test plans are the first step, and happen as early as possible in the product cycle.  
- A separate test plan will be written by a tester for each feature or feature area of the product.  
- The goal with them is to comprehensively detail all of the scenarios needed to test a given feature.  
- The test plan will group each of these scenarios into a test case
    > where 1 test case might have up to 10 or more separately verified scenarios,
    > assign a priority (P1, P2, or P3) to each test case.

b. Feature Team中對quality的運作
- The entire feature team (pm, dev, and test) will get together during a coding milestone to review the test plan and try to ensure that no scenarios are missing.  
- The team will then use the test plan as the blueprint when they go to write and automate tests, and they will implement the test scenarios in the priority order defined by the plan.

c. 專案運作過程如何改進Test Plan
- During the product cycle we’ll often find new scenarios not covered by the original test plan.  
- We call these missing scenarios “test holes”, and when found they’ll be added to the test plan and be automated.  
- Every new bug opened during the product cycle will also be analyzed by test to ensure that it would be found by the test plan
    > if not, a new test case is added to cover it.

d. Test Plan 的Sample
- Here is a pointer to a few pages from the test plan of our new GridView data control in ASP.NET 2.0: http://www.scottgu.com/blogposts/testingatmicrosoft/testplan/testplan.htm
- The full test plan for this feature is 300+ pages and involves thousands of total scenarios
- Note that some of the test cases have a number associated with them
- Look at the first AutoFormat one
    > it indicates that this test case was missed during the original review of the document (meaning a test hole) and
    > it has been added in response to bugs being opened (110263 is the bug number).

(3) Test Automation
a. Test automation的時機
- After testers finalize their test plans, they will start writing and automating the tests defined within them.  

b. 使用的languages和tools
- We use a variety of languages to test the product, and like to have a mixture of C#, VB and some J# so as to exercise the different compilers in addition to our own product.
- Tests on my team are written using a testing framework that we’ve built internally.  
- Long term we’ll use vanilla VSTS (Visual Studio Team System) infrastructure more and more, but given that they are still under active development we aren’t using it for our Whidbey release.  
The teams actually building the VSTS technology, though, are themselves “dogfooding” their own work and use it for their source control and testing infrastructure (and it is definitely being designed to handle internal Microsoft team scenarios).  

c. Test Case的內容和 Sample
- The test cases themselves are often relatively straight forward and not too code-heavy.  
- Instead, the bulk of the work goes into the shared test libraries that are shared across test scenarios and test cases.  
- Here is a pointer to an example test case written for our new WebPart personalization framework in ASP.NET 2.0: http://www.scottgu.com/blogposts/testingatmicrosoft/testcase/testcase.htm
- Note how the test case contains a number of distinct scenarios within it – each of which is verified along the way.  
- This test case and the scenarios contained within it will match the test plan exactly.  
- Each scenario is then using a common WebPart automation test library built by the SDE/T that enables heavy re-use of code across test cases.

d. Test Cases 和 Functional Test Scnearios的數量
- My team will have ~105,000 test cases and ~505,000 functional test scenarios covered when we ship Whidbey.  

e. Coverage Testing的pass criteria, execution time, tool
- Our hope/expectation is that these will yield us ~80-90% managed code block coverage of the products when we ship.
- We use this code coverage number as a rough metric to track how well we are covering test scenarios with our functional tests.  
- We also then measure “arc” coverage, which includes measuring further individual code paths within a block  
- We measure both block and arc numbers regularly along the way when we do full test passes (like we are doing this week) to check whether we are on target or not.  
- One really cool thing about VS 2005 is that VSTS includes support to automatically calculate code coverage for you

f. 如何提升coverage ratio
- There is always a percentage of code that cannot be easily exercised using functional tests
    > common examples: catastrophic situations involving a process running out of memory, difficult to reproduce threading scenarios, etc
- We exercise these conditions using our stress lab
    > where we’ll run stress tests for days/weeks on end and put a variety of weird load and usage scenarios on the servers
    > for example: we have some tests that deliberately leak memory, some that AV every once in awhile, some that continually modify .config files to cause app-domain restarts under heavy load, etc
- Stress is a whole additional blog topic that I’ll try and cover at some point in the future to give it full justice. - Going forward, my team is also moving to a model where we’ll also add more fault-injection specific tests to our functional test suites to try and get coverage of these scenarios through functional runs as well.

4. Running Tests
(1) 測試管理系統: Maddog
- My team uses an internally built system we affectionately call “Maddog” to handle managing and running our tests.  
- Post Whidbey my team will be looking to transition to a VSTS one, but for right now Maddog is the one we use.
- Maddog does a couple of things for my team, including:
    > managing test plans
    > managing test cases
    > providing a build system to build
    > deploy all test suites we want to execute during a given test run
    > providing infrastructure to image servers to run and execute our tests
    > ultimately providing a reporting system so that we can analyze failures and track the results.

(2) Testing Lab
- My team currently has 4 labs where we keep approximately 1,200 machines that Maddog helps coordinate and keep busy.  
- The machines vary in size and quality – with some being custom-built towers and others being rack-mounts.

(3) How Maddog handles test execution
- We use Maddog to help coordinate and use all these machines.  
- A tester can use Maddog within their office to build a query of tests to run
    > selecting either a sub-node of feature areas – or doing a search for tests based on some other criteria
    > then pick what hardware and OS version the tests should run on, pick what language they should be run under (Arabic, German, Japanese, etc),
    > pick what ASP.NET and Visual Studio build should be installed on the machine,
    > pick how many machines it should be distributed over.
- Maddog will then identify free machines in the lab
    > automatically format and re-image them with the appropriate operating system
    > install the right build on them
    > build and deploy the tests selected onto them, and then run the tests.  
- After everything is selected above, the tester can hit “go” and launch the test run.  Anywhere from 30 minutes to 14 hours later it will be done and ready to be analyzed.
 
5. What tests are run when?
(1) Functional Test執行時機
- We run functional tests on an almost daily basis.  
- We do a functional run on our shipping products every time we release a patch or QFE(Quick Fix Engineering, this is the Microsoft and Intel term for a hotfix).  
- We also do a functional run anytime a big software component in Microsoft releases a GDR(General Distribution Release) (for example: a security patch to Windows).
(2) 何時Run Subset Test Cases
- With ASP.NET 2.0 and Visual Web Developer we’ll usually try and run a subset of our tests 2-3 times a week.  
- This subset contains all of our P0 test cases and provides broad breadth coverage of the product (about 12% of our total test cases). 
(3) 何時Run Full Test Cases
- We’ll then try and complete a full automation run every 2-3 weeks that includes all PO, P1, P2, P3 test cases.
- As we get closer to big milestone or product events(like a ZBB, Beta or RTM), we’ll do a full test pass where we’ll run everything
    > including manually running those tests that aren’t automated yet

kojenchieh 發表在 痞客邦 留言(0) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼