2011年4月28日
#
摘要: 一個(gè)完整的自動(dòng)化測試框架體系包含以下幾個(gè)部分:1、自動(dòng)化測試框架;2、測試腳本以及測試數(shù)據(jù)管理;3、測試腳本的執(zhí)行管理系統(tǒng);4、測試結(jié)果的顯示與分析系統(tǒng)。其中最重要的是自動(dòng)化測試框架部分。
閱讀全文
摘要: JUnit
JUnit是由 Erich Gamma 和 Kent Beck 編寫的一個(gè)回歸測試框架(regression testing framework)。Junit測試是程序員測試,即所謂白盒測試,因?yàn)槌绦騿T知道被測試的軟件如何(How)完成功能和完成什么樣(What)的功能。Junit是一套框架,繼承TestCase類,就可以用Junit進(jìn)行自動(dòng)測試了。
更多JUnit信息
閱讀全文
摘要: Have you wondered why certain programs are located under /bin, or /sbin, or /usr/bin, or /usr/sbin?
For example, less command is located under /usr/bin directory. Why not /bin, or /sbin, or /usr/sbin? What is the different between all these directories?
In this article, let us review the Linux filesystem structures and understand the meaning of individual high-level directories
閱讀全文
摘要: 當(dāng)今互聯(lián)網(wǎng)的發(fā)展,已不是大魚吃小魚的時(shí)代,而是快魚吃慢魚的時(shí)代?;ヂ?lián)網(wǎng)產(chǎn)品的制勝原則就是一個(gè)字——“快”。在各種形態(tài)的產(chǎn)品研發(fā)中,我們始終貫徹如一的價(jià)值觀之一就是“快”,我們應(yīng)該如何來理解和詮釋“快”?又會(huì)從哪些方面來執(zhí)行貫徹這個(gè)原則呢?
閱讀全文
摘要: 軟件測試的十二個(gè)誤區(qū)大體總結(jié)如下:
1) 測試人員不需要了解軟件開發(fā)的知識(shí):
這個(gè)很要命的,我們談到軟件測試人員未來的發(fā)展方向大致有:自動(dòng)化測試,性能測試,測試管理,項(xiàng)目經(jīng)理。這其中自動(dòng)化測試和性能測試包括項(xiàng)目管理,都會(huì)要求對(duì)軟件開發(fā)有深入的理解,如何能設(shè)計(jì)一個(gè)好的自動(dòng)化框架,好的性能測試用例,如何管理一個(gè)開發(fā)團(tuán)隊(duì),這都需要我們?cè)谲浖_發(fā)方面有所掌握。不單要掌握,而且要精通。此其一。
其二:如果不了解開發(fā)知識(shí),測試人員很容易被開發(fā)人員牽著鼻子走,因?yàn)殚_發(fā)人員隨便一忽悠,你如果不了解個(gè)中奧妙,你一個(gè)字也說不上來。(以前我們討論 Cookie和Session,由于GoAhead不支持Session,只能用Cookie來控制,差點(diǎn)別開發(fā)人員忽悠了)
閱讀全文
摘要: 寫在前面:寫Android程序有一個(gè)很重要的原則,不阻塞UI線程。因此Android提供了5種方法來,讓一些耗時(shí)的作業(yè)在其它線程中執(zhí)行,然后把結(jié)果返回給UI線程,以免阻塞UI線程。
閱讀全文
探討了軟件測試的可測試性,主要包括Controllability, Observability, Availability,Simplicity, Stability 和 Information.
HeuristicsOfSoftwareTestability.pdf
摘要: android的selector的用法:
首先android的selector是在drawable/xxx.xml中配置的。
先看一下listview中的狀態(tài):
把下面的XML文件保存成你自己命名的.xml文件(比如list_item_bg.xml),在系統(tǒng)使用時(shí)根據(jù)ListView中的列表項(xiàng)的狀態(tài)來使用相應(yīng)的背景圖片。drawable/list_item_bg.xml
閱讀全文
摘要: The Monkey is a command-line tool that that you can run on any emulator instance or on a device. It sends a pseudo-random stream of user events into the system, which acts as a stress test on the application software you are developing.
The Monkey includes a number of options, but they break down into four primary categories:
Basic configuration options, such as setting the number of events to attempt.
Operational constraints, such as restricting the test to a single packag
閱讀全文
摘要: Programmers can configure logging either by creating loggers, handlers, and formatters explicitly in a main module with the configuration methods listed above (using Python code), or by creating a logging config file. The following code is an example of configuring a very simple logger, a console handler, and a simple formatter in a Python module:
閱讀全文
摘要: Android系統(tǒng)中Looper負(fù)責(zé)管理線程的消息隊(duì)列和消息循環(huán),具體實(shí)現(xiàn)請(qǐng)參考Looper的源碼。 可以通過Loop.myLooper()得到當(dāng)前線程的Looper對(duì)象,通過Loop.getMainLooper()可以獲得當(dāng)前進(jìn)程的主線程的Looper對(duì)象。
閱讀全文
摘要: The list below defines some of the basic terminology of the Android platform.
.apk file
Android application package file. Each Android application is compiled and packaged in a single file that includes all of the application's code (.dex files), resources, assets, and manifest file. The application package file can have any name but must use the .apk extension. For example: myExampleAppname.apk. For convenience, an application package file is often referred to as an ".apk".
Re
閱讀全文
摘要: C.__init__(self[, arg1, ...] )
Constructor (with any optional arguments)
C.__new__(self[, arg1, ...] )[a]
Constructor (with any optional argu ments); usually used for setting up subclassing of immutable data types
C.__del__(self)
Destructor
C.__str__(self)
Printable string representation; str() built-in and print statement
C.__repr__(self)
Evaluatable string representation; repr() built-in and '' operator
閱讀全文
摘要: 本來這是個(gè)老生常談的問題,上周自成又分享了一些性能優(yōu)化的建議,我這里再做一個(gè)全面的Tips整理,謹(jǐn)作為查閱型的文檔,不妥之處,還請(qǐng)指正;
如果你已經(jīng)對(duì)yahoo這些優(yōu)化建議爛熟于心,果斷點(diǎn)這里
閱讀全文
Five test auomation framework are discussed in this paper.
1) The Test Script Modularity Framework
2) The Test Library Architecture Framework
3) The Keyword-Driven or Table-Driven Testing Framework
4) The Data-Driven Testing Framework
5) The Hybrid Test Automation
摘要: 一、ASE(Android Scripting Environment)為Android系統(tǒng)帶來了腳本語言的技術(shù),通過它我們可以編輯和執(zhí)行腳本,和腳本解釋交互。腳本可以訪問多數(shù)Android API,目前有一個(gè)開源項(xiàng)目叫做Scripting Layer for Android (SL4A) ,提供了對(duì)python,javaScript, Lua等腳本的支持。ASE主要通過兩種方式來訪問 Android API,一種是通過JSON-RPC來訪問,另外一種通過BeanShell(Java語言的動(dòng)態(tài)版本)直接訪問Android API。SL4AL架構(gòu)如下圖:
閱讀全文
摘要: 2.你需要學(xué)習(xí)JAVA語言的基礎(chǔ)知識(shí)以及它的核心類庫 (collections,serialization,streams,networking, multithreading,reflection,event,handling,NIO,localization,以及其他)。
閱讀全文
1)
http://www.pythonchallenge.com/ 提供了不同level的Python題目,非常有趣的題目。做完一題后,把URL中的pc改為pcc可以看到上一題的答案
2)
http://projecteuler.net/ 里面有200多道題目,不要要求提交代碼,只要最終答案,提供用各種語言來解決問題。這里(
http://dcy.is-programmer.com/posts/8750.html)有部分題目的答案
非常好玩,有興趣的朋友,快來試試吧
看看 project euler 的第一道題:
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.
用 python 語言寫出來是:
print sum(i for i in xrange(1, 1000) if i % 3 == 0 or i % 5 == 0)
This is the first edition of what is expected to become a recurring series on InfoQ. The idea behind this minibook is that a number of InfoQ articles and interviews which deal with a particular topic (in this case, REpresentational State Transfer, or REST) are combined together to provide a detailed exploration suitable for both beginners and advanced practitioners.
Read More: http://www.infoq.com/minibooks/emag-03-2010-rest;jsessionid=1E2375E822D980824403DAD46588FAFE
摘要: #Trie Tree的基本特點(diǎn)
1)根節(jié)點(diǎn)不包含字符,除根節(jié)點(diǎn)外每個(gè)節(jié)點(diǎn)只包含一個(gè)字符
2)從根節(jié)點(diǎn)到某一個(gè)節(jié)點(diǎn),路徑上經(jīng)過的字符連接起來,為該節(jié)點(diǎn)對(duì)應(yīng)的字符串
3)每個(gè)節(jié)點(diǎn)的所有子節(jié)點(diǎn)包含的字符串不相同
閱讀全文
摘要: The Bloom filter, conceived by Burton Howard Bloom in 1970, is a space-efficient probabilistic data structure that is used to test whether an element is a member of a set.False positivesare possible, but false negatives are not. Elements can be added to the set, but not removed (though this can be addressed with a counting filter). The more elements that are added to the set, the larger the probability of false positives
閱讀全文
摘要: These posts have garnered a number of interesting comments. I want to address two of the negative ones in this post. Both are of the same general opinion that I am abandoning testers and that Google is not a nice place to ply this trade. I am puzzled by these comments because nothing could be further from the truth. One such negative comment I can take as a one-off but two smart people (hey they are reading this blog, right?) having this impression requires a rebuttal. Here are the comments:
閱讀全文
摘要: One of the key ways Google achieves good results with fewer testers than many companies is that we rarely attempt to ship a large set of features at once. In fact, the exact opposite is often the goal: build the core of a product and release it the moment it is useful to as large a crowd as feasible, then get their feedback and iterate. This is what we did with Gmail, a product that kept its beta tag for four years. That tag was our warning to users that it was still being perfected. We removed
閱讀全文
摘要: Lots of questions in the comments to the last two posts. I am not ignoring them. Hopefully many of them will be answered here and in following posts. I am just getting started on this topic.
閱讀全文
摘要: Android applications are, at least on the T-Mobile G1, limited to 16 MB of heap. It's both a lot of memory for a phone and yet very little for what some developers want to achieve. Even if you do not plan on using all of this memory, you should use as little as possible to let other applications run without getting them killed. The more applications Android can keep in memory, the faster it will be for the user to switch between his apps. As part of my job, I ran into memory leaks issues in Andr
閱讀全文
摘要: The Java community is now swamped with discussions about Oracle's patent suit against Google's Android platform. I've been contributing my opinion in several places, but there is one critical topic that needs repeating the same comments everywhere... so, this blog spills the beans once and completely.
閱讀全文
摘要: Activities in the system are managed as an activity stack. When a new activity is started, it is placed on the top of the stack and becomes the running activity -- the previous activity always remains below it in the stack, and will not come to the foreground again until the new activity exits.
閱讀全文
摘要: The one question I get more than any other is "How does Google test?" It's been explained in bits and pieces on this blog but the explanation is due an update
閱讀全文
摘要: Dependency injection asks us to separate the new operators from the application logic. This separation forces your code to have factories which are responsible for wiring your application together. However, better than writing factories, we want to use automatic dependency injection such as GUICE to do the wiring for us. But can DI really save us from all of the new operators?
閱讀全文
摘要: Everyone seems to think that they are writing OO after all they are using OO languages such as Java, Python or Ruby. But if you exam the code it is often procedural in nature
閱讀全文
By James Whittaker
I’ve had a number of questions about the SET role and it seems I have confused folks when I say that the SWE is a tester and the SET is a tester and at the same time the SWE is a developer and the SET is a developer. What could possibly be confusing about that?
Oh, yeah. Right.
My next series of posts are going to detail the role of the SET and all will eventually be clear but some clarification on career path seems worthwhile.
SETs are developers who write test code and automation as their primary task. They are in every sense of the word a developer. When we interview SETs, SWEs are on the interview loop and SWE questions are asked. They are not all of the interview, but they are part of it.
This means that the skill set that our SETs possess makes them perfect candidates for switching to the SWE role. There is neither incentive nor deterrent to do so. SETs and SWEs are on the same pay scale and bonus structure (I have both roles reporting to me so I have real visibility into salary data) and their promotion velocity (again based on actual data) is roughly equivalent. This means that SETs have no outside influences to prompt them one way or the other.
The key factor is really the type of work you are doing. SETs who find themselves involved in SWE work usually convert to SWE. SWEs are also drawn in the opposite direction. Much of this happens through our 20% time work. Any SET interested in SWE work can take on a 20% task doing feature development. Any SWE interested in automation can find a group and sign up for a 20%. Right now I have both SWEs and SETs involved in such cross pollination.
The ideal situation is that the title reflects the actual work that you are involved in. So if an SET starts doing more feature dev work than automation, he or she should convert, same for SWEs doing automation work. In my time here, conversions in both directions have happened, but it is not all that common. The work of both roles is engaging, interesting and intense. Few Googlers are walking around bored.
Bottom line: do the work you are passionate about and capable of and the right job title will find you.
一、概念
靜態(tài)分派(Static Dispatch),發(fā)生在編譯時(shí)期,分派是根據(jù)靜態(tài)類型信息發(fā)生的,方法重載就是靜態(tài)分派。
動(dòng)態(tài)分派(Dynamic Dispatch),發(fā)生在運(yùn)行時(shí)期,動(dòng)態(tài)分派動(dòng)態(tài)地置換掉某個(gè)方法。面向?qū)ο蟮恼Z言用動(dòng)態(tài)分派實(shí)現(xiàn)多態(tài)性。
Java語言支持靜態(tài)多分派和動(dòng)態(tài)的單分派,利用設(shè)計(jì)模式Java可以實(shí)現(xiàn)Double Dispatch,即訪問者模式。
二、Visitor Pattern
目的:封裝一些施加于某種數(shù)據(jù)結(jié)構(gòu)元素之上的操作。
UML圖:

主要原理:“反傳球”,Element來Visitor之間二輪調(diào)用,調(diào)用過程中用sinlge dispatch確定類型
記錄關(guān)于REST的一些技術(shù):
1、REST簡介:http://zh.wikipedia.org/zh/REST
2、InfoQ 深入淺出REST: http://www.infoq.com/cn/articles/rest-introduction
摘要: 要設(shè)計(jì)良好的架構(gòu),必須做到關(guān)注點(diǎn)分離,這樣可以產(chǎn)生高內(nèi)聚、低耦合的系統(tǒng),這是美麗架構(gòu)的終極原則
閱讀全文
摘要: A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point. CyclicBarriers are useful in programs involving a fixed sized party of threads that must occasionally wait for each other. The barrier is called cyclic because it can be re-used after the waiting threads are released.
閱讀全文
摘要: A java.util.concurrent.CountDownLatch is a concurrency construct that allows one or more threads to wait for a given set of operations to complete
閱讀全文
文章描述了實(shí)現(xiàn) Multithreaded Servers的3種方法:
1)單線程,性能性差,請(qǐng)求等待時(shí)間長
2)多線程,把接受請(qǐng)求和處理請(qǐng)求的線程分開,接受后交給 worker處理
3)線程池,性能最佳,有效地防止負(fù)載過重,重復(fù)利用線程,請(qǐng)求多時(shí),讓請(qǐng)求排隊(duì)接收處理
4)主要用socket來通信, ServerSocket 和 Socket
具體文章請(qǐng)看:http://tutorials.jenkov.com/java-multithreaded-servers/index.html
摘要: 軟件模塊之間總是存在著一定的接口,從調(diào)用方式上,可以把他們分為三類:同步調(diào)用、回調(diào)和異步調(diào)用。
同步調(diào)用是一種阻塞式調(diào)用,調(diào)用方要等待對(duì)方執(zhí)行完畢才返回,它是一種單向調(diào)用,如HTTP;
回調(diào)是一種雙向調(diào)用模式,也就是說,被調(diào)用方在接口被調(diào)用時(shí)也會(huì)調(diào)用對(duì)方的接口;
異步調(diào)用是一種類似消息或事件的機(jī)制,不過它的調(diào)用方向剛好相反,接口的服務(wù)在收到某種訊息或發(fā)生某種事件時(shí),會(huì)主動(dòng)通知客戶方(即調(diào)用客戶方的接口),如JMS;
閱讀全文
摘要: 雖然很少有 Java? 開發(fā)人員能夠忽視多線程編程和支持它的 Java 平臺(tái)庫,更少有人有時(shí)間深入研究線程。相反地,我們臨時(shí)學(xué)習(xí)線程,在需要時(shí)向我們的工具箱添加新的技巧和技術(shù)。以這種方式構(gòu)建和運(yùn)行適當(dāng)?shù)膽?yīng)用程序是可行的,但是您可以做的不止這些。理解 Java 編譯器的線程處理特性和 JVM 將有助于您編寫更高效、性能更好的 Java 代碼
閱讀全文