Caused by: java.net.ConnectException: Connection refused: master/192.168.3.129:7077

1:启动Spark Shell,spark-shell是Spark自带的交互式Shell程序,方便用户进行交互式编程,用户可以在该命令行下用scala编写spark程序。

启动Spark Shell,出现的错误如下所示:

  1 [root@master spark-1.6.1-bin-hadoop2.6]# bin/spark-shell --master spark://master:7077 --executor-memory 512M --total-executor-cores 2
  2 18/02/22 01:42:10 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  3 18/02/22 01:42:10 INFO SecurityManager: Changing view acls to: root
  4 18/02/22 01:42:10 INFO SecurityManager: Changing modify acls to: root
  5 18/02/22 01:42:10 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); users with modify permissions: Set(root)
  6 18/02/22 01:42:11 INFO HttpServer: Starting HTTP Server
  7 18/02/22 01:42:11 INFO Utils: Successfully started service 'HTTP class server' on port 52961.
  8 Welcome to
  9       ____              __
 10      / __/__  ___ _____/ /__
 11     _\ \/ _ \/ _ `/ __/  '_/
 12    /___/ .__/\_,_/_/ /_/\_\   version 1.6.1
 13       /_/
 14 
 15 Using Scala version 2.10.5 (Java HotSpot(TM) Client VM, Java 1.7.0_65)
 16 Type in expressions to have them evaluated.
 17 Type :help for more information.
 18 18/02/22 01:42:15 INFO SparkContext: Running Spark version 1.6.1
 19 18/02/22 01:42:15 INFO SecurityManager: Changing view acls to: root
 20 18/02/22 01:42:15 INFO SecurityManager: Changing modify acls to: root
 21 18/02/22 01:42:15 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); users with modify permissions: Set(root)
 22 18/02/22 01:42:15 INFO Utils: Successfully started service 'sparkDriver' on port 43566.
 23 18/02/22 01:42:16 INFO Slf4jLogger: Slf4jLogger started
 24 18/02/22 01:42:16 INFO Remoting: Starting remoting
 25 18/02/22 01:42:16 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriverActorSystem@192.168.3.129:43806]
 26 18/02/22 01:42:16 INFO Utils: Successfully started service 'sparkDriverActorSystem' on port 43806.
 27 18/02/22 01:42:16 INFO SparkEnv: Registering MapOutputTracker
 28 18/02/22 01:42:16 INFO SparkEnv: Registering BlockManagerMaster
 29 18/02/22 01:42:16 INFO DiskBlockManager: Created local directory at /tmp/blockmgr-7face114-24b5-4f0e-adb6-8a104e387c78
 30 18/02/22 01:42:16 INFO MemoryStore: MemoryStore started with capacity 517.4 MB
 31 18/02/22 01:42:16 INFO SparkEnv: Registering OutputCommitCoordinator
 32 18/02/22 01:42:16 INFO Utils: Successfully started service 'SparkUI' on port 4040.
 33 18/02/22 01:42:16 INFO SparkUI: Started SparkUI at http://192.168.3.129:4040
 34 18/02/22 01:42:17 INFO AppClient$ClientEndpoint: Connecting to master spark://master:7077...
 35 18/02/22 01:42:17 WARN AppClient$ClientEndpoint: Failed to connect to master master:7077
 36 java.io.IOException: Failed to connect to master/192.168.3.129:7077
 37     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:216)
 38     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:167)
 39     at org.apache.spark.rpc.netty.NettyRpcEnv.createClient(NettyRpcEnv.scala:200)
 40     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:187)
 41     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:183)
 42     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 43     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 44     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 45     at java.lang.Thread.run(Thread.java:745)
 46 Caused by: java.net.ConnectException: Connection refused: master/192.168.3.129:7077
 47     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
 48     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
 49     at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
 50     at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
 51     at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
 52     at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
 53     at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
 54     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
 55     at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
 56     ... 1 more
 57 18/02/22 01:42:37 INFO AppClient$ClientEndpoint: Connecting to master spark://master:7077...
 58 18/02/22 01:42:37 WARN AppClient$ClientEndpoint: Failed to connect to master master:7077
 59 java.io.IOException: Failed to connect to master/192.168.3.129:7077
 60     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:216)
 61     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:167)
 62     at org.apache.spark.rpc.netty.NettyRpcEnv.createClient(NettyRpcEnv.scala:200)
 63     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:187)
 64     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:183)
 65     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 66     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 67     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 68     at java.lang.Thread.run(Thread.java:745)
 69 Caused by: java.net.ConnectException: Connection refused: master/192.168.3.129:7077
 70     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
 71     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
 72     at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
 73     at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
 74     at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
 75     at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
 76     at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
 77     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
 78     at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
 79     ... 1 more
 80 18/02/22 01:42:57 INFO AppClient$ClientEndpoint: Connecting to master spark://master:7077...
 81 18/02/22 01:42:57 WARN AppClient$ClientEndpoint: Failed to connect to master master:7077
 82 java.io.IOException: Failed to connect to master/192.168.3.129:7077
 83     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:216)
 84     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:167)
 85     at org.apache.spark.rpc.netty.NettyRpcEnv.createClient(NettyRpcEnv.scala:200)
 86     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:187)
 87     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:183)
 88     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 89     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 90     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 91     at java.lang.Thread.run(Thread.java:745)
 92 Caused by: java.net.ConnectException: Connection refused: master/192.168.3.129:7077
 93     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
 94     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
 95     at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
 96     at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
 97     at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
 98     at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
 99     at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
100     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
101     at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
102     ... 1 more
103 18/02/22 01:42:57 INFO AppClient$ClientEndpoint: Connecting to master spark://master:7077...
104 18/02/22 01:42:57 WARN AppClient$ClientEndpoint: Failed to connect to master master:7077
105 java.io.IOException: Failed to connect to master/192.168.3.129:7077
106     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:216)
107     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:167)
108     at org.apache.spark.rpc.netty.NettyRpcEnv.createClient(NettyRpcEnv.scala:200)
109     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:187)
110     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:183)
111     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
112     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
113     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
114     at java.lang.Thread.run(Thread.java:745)
115 Caused by: java.net.ConnectException: Connection refused: master/192.168.3.129:7077
116     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
117     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
118     at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
119     at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
120     at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
121     at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
122     at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
123     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
124     at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
125     ... 1 more
126 18/02/22 01:43:17 INFO AppClient$ClientEndpoint: Connecting to master spark://master:7077...
127 18/02/22 01:43:17 ERROR SparkDeploySchedulerBackend: Application has been killed. Reason: All masters are unresponsive! Giving up.
128 18/02/22 01:43:17 INFO AppClient$ClientEndpoint: Connecting to master spark://master:7077...
129 18/02/22 01:43:17 WARN SparkDeploySchedulerBackend: Application ID is not initialized yet.
130 18/02/22 01:43:17 WARN AppClient$ClientEndpoint: Failed to connect to master master:7077
131 java.io.IOException: Failed to connect to master/192.168.3.129:7077
132     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:216)
133     at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:167)
134     at org.apache.spark.rpc.netty.NettyRpcEnv.createClient(NettyRpcEnv.scala:200)
135     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:187)
136     at org.apache.spark.rpc.netty.Outbox$$anon$1.call(Outbox.scala:183)
137     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
138     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
139     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
140     at java.lang.Thread.run(Thread.java:745)
141 Caused by: java.net.ConnectException: Connection refused: master/192.168.3.129:7077
142     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
143     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
144     at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
145     at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
146     at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
147     at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
148     at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
149     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
150     at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
151     ... 1 more
152 18/02/22 01:43:17 INFO Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 50513.
153 18/02/22 01:43:17 INFO NettyBlockTransferService: Server created on 50513
154 18/02/22 01:43:17 INFO BlockManagerMaster: Trying to register BlockManager
155 18/02/22 01:43:17 INFO BlockManagerMasterEndpoint: Registering block manager 192.168.3.129:50513 with 517.4 MB RAM, BlockManagerId(driver, 192.168.3.129, 50513)
156 18/02/22 01:43:17 INFO BlockManagerMaster: Registered BlockManager
157 18/02/22 01:43:17 INFO SparkUI: Stopped Spark web UI at http://192.168.3.129:4040
158 18/02/22 01:43:17 INFO SparkDeploySchedulerBackend: Shutting down all executors
159 18/02/22 01:43:17 INFO SparkDeploySchedulerBackend: Asking each executor to shut down
160 18/02/22 01:43:17 WARN AppClient$ClientEndpoint: Drop UnregisterApplication(null) because has not yet connected to master
161 18/02/22 01:43:17 ERROR MapOutputTrackerMaster: Error communicating with MapOutputTracker
162 java.lang.InterruptedException
163     at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1038)
164     at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
165     at scala.concurrent.impl.Promise$DefaultPromise.tryAwait(Promise.scala:208)
166     at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:218)
167     at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223)
168     at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:107)
169     at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
170     at scala.concurrent.Await$.result(package.scala:107)
171     at org.apache.spark.rpc.RpcTimeout.awaitResult(RpcTimeout.scala:75)
172     at org.apache.spark.rpc.RpcEndpointRef.askWithRetry(RpcEndpointRef.scala:101)
173     at org.apache.spark.rpc.RpcEndpointRef.askWithRetry(RpcEndpointRef.scala:77)
174     at org.apache.spark.MapOutputTracker.askTracker(MapOutputTracker.scala:110)
175     at org.apache.spark.MapOutputTracker.sendTracker(MapOutputTracker.scala:120)
176     at org.apache.spark.MapOutputTrackerMaster.stop(MapOutputTracker.scala:462)
177     at org.apache.spark.SparkEnv.stop(SparkEnv.scala:93)
178     at org.apache.spark.SparkContext$$anonfun$stop$12.apply$mcV$sp(SparkContext.scala:1756)
179     at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1229)
180     at org.apache.spark.SparkContext.stop(SparkContext.scala:1755)
181     at org.apache.spark.scheduler.cluster.SparkDeploySchedulerBackend.dead(SparkDeploySchedulerBackend.scala:127)
182     at org.apache.spark.deploy.client.AppClient$ClientEndpoint.markDead(AppClient.scala:264)
183     at org.apache.spark.deploy.client.AppClient$ClientEndpoint$$anon$2$$anonfun$run$1.apply$mcV$sp(AppClient.scala:134)
184     at org.apache.spark.util.Utils$.tryOrExit(Utils.scala:1163)
185     at org.apache.spark.deploy.client.AppClient$ClientEndpoint$$anon$2.run(AppClient.scala:129)
186     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
187     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
188     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
189     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
190     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
191     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
192     at java.lang.Thread.run(Thread.java:745)
193 18/02/22 01:43:17 ERROR Utils: Uncaught exception in thread appclient-registration-retry-thread
194 org.apache.spark.SparkException: Error communicating with MapOutputTracker
195     at org.apache.spark.MapOutputTracker.askTracker(MapOutputTracker.scala:114)
196     at org.apache.spark.MapOutputTracker.sendTracker(MapOutputTracker.scala:120)
197     at org.apache.spark.MapOutputTrackerMaster.stop(MapOutputTracker.scala:462)
198     at org.apache.spark.SparkEnv.stop(SparkEnv.scala:93)
199     at org.apache.spark.SparkContext$$anonfun$stop$12.apply$mcV$sp(SparkContext.scala:1756)
200     at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1229)
201     at org.apache.spark.SparkContext.stop(SparkContext.scala:1755)
202     at org.apache.spark.scheduler.cluster.SparkDeploySchedulerBackend.dead(SparkDeploySchedulerBackend.scala:127)
203     at org.apache.spark.deploy.client.AppClient$ClientEndpoint.markDead(AppClient.scala:264)
204     at org.apache.spark.deploy.client.AppClient$ClientEndpoint$$anon$2$$anonfun$run$1.apply$mcV$sp(AppClient.scala:134)
205     at org.apache.spark.util.Utils$.tryOrExit(Utils.scala:1163)
206     at org.apache.spark.deploy.client.AppClient$ClientEndpoint$$anon$2.run(AppClient.scala:129)
207     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
208     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
209     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
210     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
211     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
212     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
213     at java.lang.Thread.run(Thread.java:745)
214 Caused by: java.lang.InterruptedException
215     at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1038)
216     at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
217     at scala.concurrent.impl.Promise$DefaultPromise.tryAwait(Promise.scala:208)
218     at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:218)
219     at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223)
220     at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:107)
221     at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
222     at scala.concurrent.Await$.result(package.scala:107)
223     at org.apache.spark.rpc.RpcTimeout.awaitResult(RpcTimeout.scala:75)
224     at org.apache.spark.rpc.RpcEndpointRef.askWithRetry(RpcEndpointRef.scala:101)
225     at org.apache.spark.rpc.RpcEndpointRef.askWithRetry(RpcEndpointRef.scala:77)
226     at org.apache.spark.MapOutputTracker.askTracker(MapOutputTracker.scala:110)
227     ... 18 more
228 18/02/22 01:43:17 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
229 18/02/22 01:43:17 INFO SparkContext: Successfully stopped SparkContext
230 18/02/22 01:43:17 ERROR SparkUncaughtExceptionHandler: Uncaught exception in thread Thread[appclient-registration-retry-thread,5,main]
231 org.apache.spark.SparkException: Exiting due to error from cluster scheduler: All masters are unresponsive! Giving up.
232     at org.apache.spark.scheduler.TaskSchedulerImpl.error(TaskSchedulerImpl.scala:438)
233     at org.apache.spark.scheduler.cluster.SparkDeploySchedulerBackend.dead(SparkDeploySchedulerBackend.scala:124)
234     at org.apache.spark.deploy.client.AppClient$ClientEndpoint.markDead(AppClient.scala:264)
235     at org.apache.spark.deploy.client.AppClient$ClientEndpoint$$anon$2$$anonfun$run$1.apply$mcV$sp(AppClient.scala:134)
236     at org.apache.spark.util.Utils$.tryOrExit(Utils.scala:1163)
237     at org.apache.spark.deploy.client.AppClient$ClientEndpoint$$anon$2.run(AppClient.scala:129)
238     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
239     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
240     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
241     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
242     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
243     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
244     at java.lang.Thread.run(Thread.java:745)
245 18/02/22 01:43:17 INFO DiskBlockManager: Shutdown hook called
246 18/02/22 01:43:17 INFO ShutdownHookManager: Shutdown hook called
247 18/02/22 01:43:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-bf09944d-9867-4256-89c6-e8b415c9c315/userFiles-12e582c1-0438-490f-a8a2-64264d764463
248 18/02/22 01:43:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-7c648867-90b8-4d3c-af09-b1f3d16d1b30
249 18/02/22 01:43:17 INFO ShutdownHookManager: Deleting directory /tmp/spark-bf09944d-9867-4256-89c6-e8b415c9c315

2:解决方法,是你必须先启动你的Spark集群,这样再启动Spark Shell即可:

在master节点,启动你的spark集群,启动方式如下所示:

[root@master spark-1.6.1-bin-hadoop2.6]# sbin/start-all.sh

然后再启动你的Spark Shell即可,解决上面的错误:

[root@master spark-1.6.1-bin-hadoop2.6]# bin/spark-shell --master spark://master:7077 --executor-memory 512M --total-executor-cores 2

启动的内容,注意一些重点内容:

第33行,第47行,第119行。

[root@master spark-1.6.1-bin-hadoop2.6]# bin/spark-shell --master spark://master:7077 --executor-memory 512M --total-executor-cores 2
18/02/22 01:51:00 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
18/02/22 01:51:00 INFO SecurityManager: Changing view acls to: root
18/02/22 01:51:00 INFO SecurityManager: Changing modify acls to: root
18/02/22 01:51:00 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); users with modify permissions: Set(root)
18/02/22 01:51:00 INFO HttpServer: Starting HTTP Server
18/02/22 01:51:00 INFO Utils: Successfully started service 'HTTP class server' on port 58729.
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 1.6.1
      /_/

Using Scala version 2.10.5 (Java HotSpot(TM) Client VM, Java 1.7.0_65)
Type in expressions to have them evaluated.
Type :help for more information.
18/02/22 01:51:06 INFO SparkContext: Running Spark version 1.6.1
18/02/22 01:51:06 INFO SecurityManager: Changing view acls to: root
18/02/22 01:51:06 INFO SecurityManager: Changing modify acls to: root
18/02/22 01:51:06 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); users with modify permissions: Set(root)
18/02/22 01:51:06 INFO Utils: Successfully started service 'sparkDriver' on port 45298.
18/02/22 01:51:06 INFO Slf4jLogger: Slf4jLogger started
18/02/22 01:51:06 INFO Remoting: Starting remoting
18/02/22 01:51:07 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriverActorSystem@192.168.3.129:36868]
18/02/22 01:51:07 INFO Utils: Successfully started service 'sparkDriverActorSystem' on port 36868.
18/02/22 01:51:07 INFO SparkEnv: Registering MapOutputTracker
18/02/22 01:51:07 INFO SparkEnv: Registering BlockManagerMaster
18/02/22 01:51:07 INFO DiskBlockManager: Created local directory at /tmp/blockmgr-3b5e312e-7f6b-491d-8539-4a5f38d3839a
18/02/22 01:51:07 INFO MemoryStore: MemoryStore started with capacity 517.4 MB
18/02/22 01:51:07 INFO SparkEnv: Registering OutputCommitCoordinator
18/02/22 01:51:07 INFO Utils: Successfully started service 'SparkUI' on port 4040.
18/02/22 01:51:07 INFO SparkUI: Started SparkUI at http://192.168.3.129:4040
18/02/22 01:51:07 INFO AppClient$ClientEndpoint: Connecting to master spark://master:7077...
18/02/22 01:51:08 INFO SparkDeploySchedulerBackend: Connected to Spark cluster with app ID app-20180222015108-0000
18/02/22 01:51:08 INFO Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 46282.
18/02/22 01:51:08 INFO NettyBlockTransferService: Server created on 46282
18/02/22 01:51:08 INFO BlockManagerMaster: Trying to register BlockManager
18/02/22 01:51:08 INFO BlockManagerMasterEndpoint: Registering block manager 192.168.3.129:46282 with 517.4 MB RAM, BlockManagerId(driver, 192.168.3.129, 46282)
18/02/22 01:51:08 INFO BlockManagerMaster: Registered BlockManager
18/02/22 01:51:08 INFO AppClient$ClientEndpoint: Executor added: app-20180222015108-0000/0 on worker-20180222174932-192.168.3.130-39616 (192.168.3.130:39616) with 1 cores
18/02/22 01:51:08 INFO SparkDeploySchedulerBackend: Granted executor ID app-20180222015108-0000/0 on hostPort 192.168.3.130:39616 with 1 cores, 512.0 MB RAM
18/02/22 01:51:08 INFO AppClient$ClientEndpoint: Executor added: app-20180222015108-0000/1 on worker-20180222174932-192.168.3.131-58163 (192.168.3.131:58163) with 1 cores
18/02/22 01:51:08 INFO SparkDeploySchedulerBackend: Granted executor ID app-20180222015108-0000/1 on hostPort 192.168.3.131:58163 with 1 cores, 512.0 MB RAM
18/02/22 01:51:09 INFO SparkDeploySchedulerBackend: SchedulerBackend is ready for scheduling beginning after reached minRegisteredResourcesRatio: 0.0
18/02/22 01:51:09 INFO SparkILoop: Created spark context..
Spark context available as sc.
18/02/22 01:51:10 INFO AppClient$ClientEndpoint: Executor updated: app-20180222015108-0000/1 is now RUNNING
18/02/22 01:51:10 INFO AppClient$ClientEndpoint: Executor updated: app-20180222015108-0000/0 is now RUNNING
18/02/22 01:51:16 INFO HiveContext: Initializing execution hive, version 1.2.1
18/02/22 01:51:17 INFO ClientWrapper: Inspected Hadoop version: 2.6.0
18/02/22 01:51:17 INFO ClientWrapper: Loaded org.apache.hadoop.hive.shims.Hadoop23Shims for Hadoop version 2.6.0
18/02/22 01:51:21 INFO HiveMetaStore: 0: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore
18/02/22 01:51:22 INFO ObjectStore: ObjectStore, initialize called
18/02/22 01:51:26 INFO Persistence: Property datanucleus.cache.level2 unknown - will be ignored
18/02/22 01:51:26 INFO Persistence: Property hive.metastore.integral.jdo.pushdown unknown - will be ignored
18/02/22 01:51:26 WARN Connection: BoneCP specified but not present in CLASSPATH (or one of dependencies)
18/02/22 01:51:30 WARN Connection: BoneCP specified but not present in CLASSPATH (or one of dependencies)
18/02/22 01:51:35 INFO ObjectStore: Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order"
18/02/22 01:51:38 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:38 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:39 INFO SparkDeploySchedulerBackend: Registered executor NettyRpcEndpointRef(null) (slaver2:55056) with ID 1
18/02/22 01:51:39 INFO BlockManagerMasterEndpoint: Registering block manager slaver2:57607 with 146.2 MB RAM, BlockManagerId(1, slaver2, 57607)
18/02/22 01:51:39 INFO SparkDeploySchedulerBackend: Registered executor NettyRpcEndpointRef(null) (slaver1:47165) with ID 0
18/02/22 01:51:40 INFO BlockManagerMasterEndpoint: Registering block manager slaver1:38278 with 146.2 MB RAM, BlockManagerId(0, slaver1, 38278)
18/02/22 01:51:40 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:40 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:40 INFO MetaStoreDirectSql: Using direct SQL, underlying DB is DERBY
18/02/22 01:51:40 INFO ObjectStore: Initialized ObjectStore
18/02/22 01:51:41 WARN ObjectStore: Version information not found in metastore. hive.metastore.schema.verification is not enabled so recording the schema version 1.2.0
18/02/22 01:51:42 WARN ObjectStore: Failed to get database default, returning NoSuchObjectException
Java HotSpot(TM) Client VM warning: You have loaded library /tmp/libnetty-transport-native-epoll870809507217922299.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
18/02/22 01:51:44 INFO HiveMetaStore: Added admin role in metastore
18/02/22 01:51:44 INFO HiveMetaStore: Added public role in metastore
18/02/22 01:51:44 INFO HiveMetaStore: No user is added in admin role, since config is empty
18/02/22 01:51:45 INFO HiveMetaStore: 0: get_all_databases
18/02/22 01:51:45 INFO audit: ugi=root    ip=unknown-ip-addr    cmd=get_all_databases    
18/02/22 01:51:45 INFO HiveMetaStore: 0: get_functions: db=default pat=*
18/02/22 01:51:45 INFO audit: ugi=root    ip=unknown-ip-addr    cmd=get_functions: db=default pat=*    
18/02/22 01:51:45 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MResourceUri" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:46 INFO SessionState: Created HDFS directory: /tmp/hive/root
18/02/22 01:51:46 INFO SessionState: Created local directory: /tmp/root
18/02/22 01:51:46 INFO SessionState: Created local directory: /tmp/afacd186-3b65-4cf9-a9b3-dad36055ed80_resources
18/02/22 01:51:46 INFO SessionState: Created HDFS directory: /tmp/hive/root/afacd186-3b65-4cf9-a9b3-dad36055ed80
18/02/22 01:51:46 INFO SessionState: Created local directory: /tmp/root/afacd186-3b65-4cf9-a9b3-dad36055ed80
18/02/22 01:51:46 INFO SessionState: Created HDFS directory: /tmp/hive/root/afacd186-3b65-4cf9-a9b3-dad36055ed80/_tmp_space.db
18/02/22 01:51:46 INFO HiveContext: default warehouse location is /user/hive/warehouse
18/02/22 01:51:46 INFO HiveContext: Initializing HiveMetastoreConnection version 1.2.1 using Spark classes.
18/02/22 01:51:46 INFO ClientWrapper: Inspected Hadoop version: 2.6.0
18/02/22 01:51:46 INFO ClientWrapper: Loaded org.apache.hadoop.hive.shims.Hadoop23Shims for Hadoop version 2.6.0
18/02/22 01:51:47 INFO HiveMetaStore: 0: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore
18/02/22 01:51:47 INFO ObjectStore: ObjectStore, initialize called
18/02/22 01:51:47 INFO Persistence: Property datanucleus.cache.level2 unknown - will be ignored
18/02/22 01:51:47 INFO Persistence: Property hive.metastore.integral.jdo.pushdown unknown - will be ignored
18/02/22 01:51:47 WARN Connection: BoneCP specified but not present in CLASSPATH (or one of dependencies)
18/02/22 01:51:48 WARN Connection: BoneCP specified but not present in CLASSPATH (or one of dependencies)
18/02/22 01:51:49 INFO ObjectStore: Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order"
18/02/22 01:51:51 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:51 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:51 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:51 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:51 INFO Query: Reading in results for query "org.datanucleus.store.rdbms.query.SQLQuery@0" since the connection used is closing
18/02/22 01:51:51 INFO MetaStoreDirectSql: Using direct SQL, underlying DB is DERBY
18/02/22 01:51:51 INFO ObjectStore: Initialized ObjectStore
18/02/22 01:51:51 INFO HiveMetaStore: Added admin role in metastore
18/02/22 01:51:51 INFO HiveMetaStore: Added public role in metastore
18/02/22 01:51:51 INFO HiveMetaStore: No user is added in admin role, since config is empty
18/02/22 01:51:52 INFO HiveMetaStore: 0: get_all_databases
18/02/22 01:51:52 INFO audit: ugi=root    ip=unknown-ip-addr    cmd=get_all_databases    
18/02/22 01:51:52 INFO HiveMetaStore: 0: get_functions: db=default pat=*
18/02/22 01:51:52 INFO audit: ugi=root    ip=unknown-ip-addr    cmd=get_functions: db=default pat=*    
18/02/22 01:51:52 INFO Datastore: The class "org.apache.hadoop.hive.metastore.model.MResourceUri" is tagged as "embedded-only" so does not have its own datastore table.
18/02/22 01:51:52 INFO SessionState: Created local directory: /tmp/e209230b-e230-4688-9b83-b04d182b952d_resources
18/02/22 01:51:52 INFO SessionState: Created HDFS directory: /tmp/hive/root/e209230b-e230-4688-9b83-b04d182b952d
18/02/22 01:51:52 INFO SessionState: Created local directory: /tmp/root/e209230b-e230-4688-9b83-b04d182b952d
18/02/22 01:51:52 INFO SessionState: Created HDFS directory: /tmp/hive/root/e209230b-e230-4688-9b83-b04d182b952d/_tmp_space.db
18/02/22 01:51:52 INFO SparkILoop: Created sql context (with Hive support)..
SQL context available as sqlContext.

scala> 

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Part I Getting Started 1 Introducing Microsoft SharePoint 2010 . 3 What Is SharePoint? 3 Main Capabilities 4 Sites . 5 Communities 5 Content . 5 Search . 6 Insights 6 Composites 6 SharePoint Basic Concepts 7 SharePoint Central Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Site Collections and Websites . 8 Lists, Libraries, Items, and Documents 10 Web Parts and Web Part Pages 12 Architectural Overview . 12 Logical and Physical Architecture 14 Service Applications . 16 The Role of Databases 17 SharePoint Editions . 18 SharePoint Foundation 18 SharePoint Server Standard 19 SharePoint Server Enterprise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 SharePoint for Internet Sites . 20 SharePoint Online . 20 SharePoint for Developers . 20 ASP.NET Integration . 21 Server-Side Technologies 21 Client-Side Technologies 22 Download at Pin5i.Com viii Table of Contents Web Parts and UI 22 Data Provisioning 22 Event Receivers and Workflows 23 Security Infrastructure 23 Business Connectivity Services . 23 Windows PowerShell Support 24 Developer Tools . 24 Microsoft SharePoint Designer 2010 . 24 Microsoft Visual Studio 2010 26 SharePoint Server Explorer 28 Solution Explorer and Feature Designer . 29 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2 Data Foundation 31 Lists of Items and Contents . 31 Site Columns 46 Content Types 47 Websites 50 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Part II Programming Microsoft SharePoint 2010 3 Server Object Model . 55 Startup Environment 56 Objects Hierarchy 56 SPFarm, SPServer, SPService, and SPWebApplication . . . . . . . . . . . . . . . . 57 SPSite and SPWeb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 SPList and SPListItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 SPDocumentLibrary and SPFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 SPGroup, SPUser, and Other Security Types . 69 SPControl and SPContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Common and Best Practices 72 Disposing Resources . 73 Handling Exceptions . 76 Transactions . 78 AllowUnsafeUpdates and FormDigest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Download at Pin5i.Com Table of Contents ix Real-Life Examples 80 Creating a New Site Collection . 80 Creating a New Website 82 Lists and Items . 83 Document Libraries and Files 92 Groups and Users 97 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4 LINQ to SharePoint 101 LINQ Overview 101 The Goal of LINQ 102 LINQ Under the Covers 104 Introducing LINQ to SharePoint . 106 Modeling with SPMetal.EXE 107 Querying Data . 117 Managing Data 122 Inserting a New Item 124 Deleting or Recycling an Existing Item . 125 Advanced Topics 126 Handling Concurrency Conflicts 126 Identity Management and Refresh 130 Disconnected Entities . 132 Model Extensions and Versioning 134 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 5 Client-Side Technologies . 137 Architectural Overview . 137 SharePoint Client Object Model . 138 Managed Client Object Model . 139 Silverlight Client Object Model 147 ECMAScript Client Object Model . 152 Client Object Model by Examples 158 Lists and Items . 159 Document Libraries and Files 165 SOAP Services 168 The REST API 171 Querying for Data with .NET and LINQ 173 Managing Data 177 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Download at Pin5i.Com x Table of Contents Part III Developing Web Parts 6 Web Part Basics 183 Web Part Architecture 183 A “Hello World” Web Part 184 Web Part Deployment 188 Real Web Parts . 192 Classic Web Parts 192 Visual Web Parts . 195 Configurable Web Parts . 197 Configurable Parameters . 198 Editor Parts . 200 Handling Display Modes 204 Custom Web Part Verbs . 205 The SharePoint-Specific WebPart class 207 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 7 Advanced Web Parts . 209 Connectable Web Parts 209 Supporting AJAX 215 Connectable Web Parts with AJAX 217 Silverlight and External Applications . 220 Asynchronous Programming 223 XSLT Rendering 226 Deployment, Security, and Versioning 233 Deployment and Versioning . 233 SafeControls and Cross-Site-Scripting SafeGuard . 236 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Part IV Extending Microsoft SharePoint 2010 8 SharePoint Features and Solutions 241 Features and Solutions . 241 Feature Element Types . 246 Features and Solutions Deployment 248 Packaging with Visual Studio 2010 254 Upgrading Solutions and Features . 256 Feature Receivers 259 Handling FeatureUpgrading Events . 262 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Download at Pin5i.Com Table of Contents xi 9 Extending the User Interface . 265 Custom Actions 265 The CustomAction Element . 265 The CustomActionGroup Element 273 The HideCustomAction Element . 275 Server-Side Custom Actions 276 Ribbons . 279 Ribbon Command . 279 Delegate Controls . 291 Custom Contents . 295 Images and Generic Content 295 Application Pages . 297 Content Pages, Web Part Pages, and Galleries 299 Status Bar and Notification Area 305 Dialog Framework . 309 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 10 Data Provisioning . 315 Site Columns 315 Content Types 320 Content Type IDs . 323 More about Content Types . 326 Document Content Types 328 List Definitions . 329 List Schema File . 329 Defining a Custom View 339 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 11 Developing Custom Fields 345 Fields Type Basics 345 The SPField Class . 347 Developing Custom Field Types . 349 A Basic E-Mail Field Type . 349 A Multicolumn Field Type 354 Field Rendering Control . 358 Field Rendering Templates 361 Field Rendering Using CAML 365 Field Rendering Using XSLT 367 Download at Pin5i.Com xii Table of Contents Supporting Mobile Devices . 369 Field Rendering Mobile Templates 374 Custom Field Editor 376 Custom Properties Persistence . 381 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 12 Event Receivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Types of Receivers . 385 Item-Level Event Receivers 386 List-Level Event Receivers 391 Web-Level Event Receivers 393 Workflow Event Receivers 394 E-Mail Event Receivers 395 Avoiding Event Loops . 396 Event Deployment and Binding 397 Event Synchronization 398 Event Security 400 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 13 Document Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 Document Sets 401 Provisioning Document Sets . 403 Handling Document Sets by Code . 410 Document ID 411 Custom Document ID Provider 414 File Conversion Services . 417 Word Automation Services . 417 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 14 Site Templates 423 Native Site Definitions 424 Site Definitions . 428 Site Definitions with Visual Studio 431 Custom Web Templates . 439 Site Definitions versus Web Templates 444 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444 Download at Pin5i.Com Table of Contents xiii 15 Developing Service Applications . 445 Service Application Architecture 445 Service Application Framework 449 Creating a Service Application 449 Custom Protocol Service Application 450 Solution Outline 453 Service Application . 454 Service Application Database . 456 Service 458 Service Instance 465 Administrative Pages 466 Service Application Deployment 467 Service Application Proxy 469 Service Application Consumer 473 Service Application Proxy Deployment 473 Final Thoughts . 474 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 Part V Developing Workflows 16 SharePoint Workflows Architecture 479 Workflow Foundation Overview . 479 Workflow Foundation Architecture . 479 Workflow Types . 483 Workflows Definition 484 Custom Activities 486 Workflow Execution Model . 489 Workflows in SharePoint 489 Workflow Targets and Association 491 SharePoint 2010 Custom Activities 492 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 17 Workflows with SharePoint Designer 2010 495 SharePoint Designer 2010 Workflows 495 Workflow Designer . 496 Conditions and Actions 498 Structure of a Published Workflow 502 Download at Pin5i.Com xiv Table of Contents Designing a Workflow 502 Workflow Outline Definition . 503 Workflow Settings 507 Workflow User Experience 508 Visio 2010 Integration 510 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 18 Workflows with Visual Studio 2010 . 515 Workflow Modeling 515 Creating the Workflow Project . 515 Workflow Outline 519 Correlation Tokens 533 Site Workflows . 534 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 19 Workflow Forms . 535 Management Forms 535 Association Form 537 Initiation Form . 544 Modification Form 547 Task Forms 547 Workflow Tasks 547 Forms Deployment . 553 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 20 Advanced Workflows 555 Custom Actions and Conditions . 555 Dependency Properties . 555 Custom Actions for SharePoint Designer 2010 557 Custom Conditions for SharePoint Designer 2010 563 Workflow Event Receivers 565 Workflow Services . 566 Implementing the Service . 568 Workflow Service Deployment . 573 Communication Activities 575 Workflow Management by Code . 576 Workflow Server Object Model 576 Workflow Web Service . 579 Download at Pin5i.Com Table of Contents xv SPTimer Service and Workflows . 585 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 Part VI Security Infrastructure 21 Authentication and Authorization Infrastructure 589 Authentication Infrastructure 589 Classic Mode Authentication 590 Claims-Authentication Types . 592 Configuring FBA with SQL Membership Provider . 597 Configuring the SQL Server Database . 597 Authorization Infrastructure 603 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 22 Claims-Based Authentication and Federated Identities . 607 Claims-Based Authentication and WS-Federation 607 Implementing an STS with Windows Identity Foundation 611 Building a Security Token Service 611 Building a Relying Party 617 SharePoint Trusted Identity Providers . 621 Trusting the IP/STS 622 Configuring the Target Web Application 625 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 23 Code Access Security and Sandboxed Solutions . 629 Code Access Security 629 Partially Trusted ASP.NET Code 631 Sandboxed Solutions Overview 639 Sandboxed Solutions Architecture . 640 Creating a Sandboxed Solution 645 Implementing a Solution Validator 647 Full-Trust Proxies . 650 Implementing a Full-Trust Proxy 651 Registering the Full-Trust Proxy 652 Consuming the Full-Trust Proxy . 654 Sandboxed Solutions and Office 365 655 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 Download at Pin5i.Com xvi Table of Contents Part VII Enterprise Features 24 Programming the Search Engine . 659 Search Engine Overview for Developers . 659 Customizing and Extending the User Interface . 662 Customizing the Output via XSLT 664 Developing Custom Web Parts 668 Federation Framework . 670 Implementing a Custom Federation Provider 674 Using the Search Engine by Code 678 Federated Search Object Model 678 Query Object Model 681 Query Web Service . 684 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 25 Business Connectivity Services 689 Overview of Business Connectivity Services . 689 Accessing a Database . 691 BDC Model File 700 Offline Capabilities 703 Accessing a WCF/SOAP Service 705 .NET Custom Model 710 Developing a Custom Model from Scratch 712 Associating Entities . 719 Programming with BCS Object Model 721 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723 Index . 725
Software Testing and Continuous Quality Improvement<br><br>SECTION I SOFTWARE QUALITY IN PERSPECTIVE . . . . . . . . . . . . . . . 1<br>1 Quality Assurance Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br>What Is Quality?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br>Prevention versus Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6<br>Verification versus Validation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br>Software Quality Assurance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br>Components of Quality Assurance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br>Software Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br>Quality Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br>Software Configuration Management . . . . . . . . . . . . . . . . . . . . . . . . . 12<br>Elements of Software Configuration Management. . . . . . . . . . . . . . . 12<br>Component Identification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br>Version Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br>Configuration Building. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br>Change Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br>Software Quality Assurance Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br>Steps to Develop and Implement a Software Quality <br>Assurance Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br>Step 1. Document the Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br>Step 2. Obtain Management Acceptance . . . . . . . . . . . . . . . . . . . . 18<br>Step 3. Obtain Development Acceptance. . . . . . . . . . . . . . . . . . . . 18<br>Step 4. Plan for Implementation of the SQA Plan . . . . . . . . . . . . . 19<br>Step 5. Execute the SQA Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br>Quality Standards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br>ISO9000. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br>Capability Maturity Model (CMM) . . . . . . . . . . . . . . . . . . . . . . . . . 20<br>Level 1 — Initial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br>Level 2 — Repeatable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br>Level 3 — Defined. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22<br>Level 4 — Managed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22<br>Level 5 — Optimized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br>PCMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br>CMMI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br>Malcom Baldrige National Quality Award . . . . . . . . . . . . . . . . . . . 24<br>Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27<br>vii<br><br> <br>Software Testing and Continuous Quality Improvement<br>2 Overview of Testing Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . 29<br>Black-Box Testing (Functional). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29<br>White-Box Testing (Structural). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br>Gray-Box Testing (Functional and Structural) . . . . . . . . . . . . . . . . . . 30<br>Manual versus Automated Testing . . . . . . . . . . . . . . . . . . . . . . . . . 31<br>Static versus Dynamic Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31<br>Taxonomy of Software Testing Techniques . . . . . . . . . . . . . . . . . . . . 32<br>3 Quality through Continuous Improvement Process . . . . . . . . . . . 41<br>Contribution of Edward Deming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41<br>Role of Statistical Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42<br>Cause-and-Effect Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42<br>Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42<br>Pareto Chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42<br>Run Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42<br>Histogram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43<br>Scatter Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43<br>Control Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43<br>Deming’s 14 Quality Principles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43<br>Point 1: Create Constancy of Purpose. . . . . . . . . . . . . . . . . . . . . . . 43<br>Point 2: Adopt the New Philosophy . . . . . . . . . . . . . . . . . . . . . . . . 44<br>Point 3: Cease Dependence on Mass Inspection. . . . . . . . . . . . . . 44<br>Point 4: End the Practice of Awarding Business on Price <br>Tag Alone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44<br>Point 5: Improve Constantly and Forever the System <br>of Production and Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45<br>Point 6: Institute Training and Retraining . . . . . . . . . . . . . . . . . . . 45<br>Point 7: Institute Leadership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45<br>Point 8: Drive Out Fear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46<br>Point 9: Break Down Barriers between Staff Areas . . . . . . . . . . . . 46<br>Point 10: Eliminate Slogans, Exhortations, and Targets <br>for the Workforce. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47<br>Point 11: Eliminate Numerical Goals. . . . . . . . . . . . . . . . . . . . . . . . 47<br>Point 12: Remove Barriers to Pride of Workmanship . . . . . . . . . . 47<br>Point 13: Institute a Vigorous Program of Education and <br>Retraining. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48<br>Point 14: Take Action to Accomplish the Transformation. . . . . . 48<br>Continuous Improvement through the Plan, Do, Check, <br>Act Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48<br>Going around the PDCA Circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50<br>SECTION II LIFE CYCLE TESTING REVIEW . . . . . . . . . . . . . . . . . . . . . 51<br>4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53<br>Waterfall Development Methodology . . . . . . . . . . . . . . . . . . . . . . . . . 53<br>Continuous Improvement “Phased” Approach . . . . . . . . . . . . . . . . . 54<br>viii<br><br> <br>Contents<br>Psychology of Life Cycle Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54<br>Software Testing as a Continuous Improvement Process. . . . . . . . . 55<br>The Testing Bible: Software Test Plan. . . . . . . . . . . . . . . . . . . . . . . . . 58<br>Major Steps to Develop a Test Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br>1. Define the Test Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br>2. Develop the Test Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br>3. Define the Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br>4. Develop the Test Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 61<br>5. Schedule the Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61<br>6. Review and Approve the Test Plan. . . . . . . . . . . . . . . . . . . . . . . 61<br>Components of a Test Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61<br>Technical Reviews as a Continuous Improvement Process. . . . . . . 61<br>Motivation for Technical Reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65<br>Types of Reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br>Structured Walkthroughs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br>Inspections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br>Participant Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69<br>Steps for an Effective Review. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70<br>1. Plan for the Review Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70<br>2. Schedule the Review. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70<br>3. Develop the Review Agenda. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71<br>4. Create a Review Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71<br>5 Verifying the Requirements Phase. . . . . . . . . . . . . . . . . . . . . . . . . 73<br>Testing the Requirements with Technical Reviews. . . . . . . . . . . . . . 74<br>Inspections and Walkthroughs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br>Checklists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br>Methodology Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75<br>Requirements Traceability Matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . 76<br>Building the System/Acceptance Test Plan . . . . . . . . . . . . . . . . . . . . 76<br>6 Verifying the Logical Design Phase . . . . . . . . . . . . . . . . . . . . . . . . 79<br>Data Model, Process Model, and the Linkage. . . . . . . . . . . . . . . . . . . 79<br>Testing the Logical Design with Technical Reviews . . . . . . . . . . . . . 80<br>Refining the System/Acceptance Test Plan . . . . . . . . . . . . . . . . . . . . 81<br>7 Verifying the Physical Design Phase . . . . . . . . . . . . . . . . . . . . . . . 83<br>Testing the Physical Design with Technical Reviews . . . . . . . . . . . . 83<br>Creating Integration Test Cases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85<br>Methodology for Integration Testing. . . . . . . . . . . . . . . . . . . . . . . . . . 85<br>Step 1: Identify Unit Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85<br>Step 2: Reconcile Interfaces for Completeness. . . . . . . . . . . . . . . 85<br>Step 3: Create Integration Test Conditions . . . . . . . . . . . . . . . . . . 86<br>Step 4: Evaluate the Completeness of Integration Test <br>Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86<br>ix<br><br> <br>Software Testing and Continuous Quality Improvement<br>8 Verifying the Program Unit Design Phase . . . . . . . . . . . . . . . . . . . 87<br>Testing the Program Unit Design with Technical Reviews . . . . . . . . 87<br>Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87<br>Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87<br>Iteration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87<br>Creating Unit Test Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88<br>9 Verifying the Coding Phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91<br>Testing Coding with Technical Reviews . . . . . . . . . . . . . . . . . . . . . . . 91<br>Executing the Test Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91<br>Unit Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92<br>Integration Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93<br>System Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93<br>Acceptance Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94<br>Defect Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br>SECTION III SOFTWARE TESTING METHODOLOGY. . . . . . . . . . . . . . 97<br>10 Development Methodology Overview . . . . . . . . . . . . . . . . . . . . . . 99<br>Limitations of Life Cycle Development . . . . . . . . . . . . . . . . . . . . . . . . 99<br>The Client/Server Challenge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100<br>Psychology of Client/Server Spiral Testing. . . . . . . . . . . . . . . . . . . . 101<br>The New School of Thought. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101<br>Tester/Developer Perceptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . 102<br>Project Goal: Integrate QA and Development . . . . . . . . . . . . . . . 103<br>Iterative/Spiral Development Methodology. . . . . . . . . . . . . . . . . 104<br>Role of JADs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106<br>Role of Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107<br>Methodology for Developing Prototypes . . . . . . . . . . . . . . . . . . . . . 108<br>1. Develop the Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108<br>2. Demonstrate Prototypes to Management. . . . . . . . . . . . . . . . . 110<br>3. Demonstrate Prototype to Users. . . . . . . . . . . . . . . . . . . . . . . . 110<br>4. Revise and Finalize Specifications. . . . . . . . . . . . . . . . . . . . . . . 111<br>5. Develop the Production System . . . . . . . . . . . . . . . . . . . . . . . . 111<br>Continuous Improvement “Spiral” Testing Approach. . . . . . . . . . . 112<br>11 Information Gathering (Plan). . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br>Step 1: Prepare for the Interview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br>Task 1: Identify the Participants . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br>Task 2: Define the Agenda. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br>Step 2: Conduct the Interview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br>Task 1: Understand the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br>Task 2: Understand the Project Objectives . . . . . . . . . . . . . . . . . 121<br>Task 3: Understand the Project Status . . . . . . . . . . . . . . . . . . . . . 121<br>Task 4: Understand the Project Plans. . . . . . . . . . . . . . . . . . . . . . 122<br>Task 5: Understand the Project Development Methodology. . . 122<br>Task 6: Identify the High-Level Business Requirements. . . . . . . 123<br>x<br><br>Contents<br>Task 7: Perform Risk Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124<br>Computer Risk Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124<br>Method 1 — Judgment and Instinct. . . . . . . . . . . . . . . . . . . . . 125<br>Method 2 — Dollar Estimation . . . . . . . . . . . . . . . . . . . . . . . . . 125<br>Method 3 — Identifying and Weighting Risk Attributes. . . . . 125<br>Step 3: Summarize the Findings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126<br>Task 1: Summarize the Interview. . . . . . . . . . . . . . . . . . . . . . . . . . 126<br>Task 2: Confirm the Interview Findings . . . . . . . . . . . . . . . . . . . . 127<br>12 Test Planning (Plan) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129<br>Step 1: Build a Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130<br>Task 1: Prepare an Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 130<br>Task 2: Define the High-Level Functional Requirements <br>(in Scope). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131<br>Task 3: Identify Manual/Automated Test Types . . . . . . . . . . . . . 132<br>Task 4: Identify the Test Exit Criteria . . . . . . . . . . . . . . . . . . . . . . 133<br>Task 5: Establish Regression Test Strategy . . . . . . . . . . . . . . . . . 134<br>Task 6: Define the Test Deliverables. . . . . . . . . . . . . . . . . . . . . . . 136<br>Task 7: Organize the Test Team. . . . . . . . . . . . . . . . . . . . . . . . . . . 137<br>Task 8: Establish a Test Environment. . . . . . . . . . . . . . . . . . . . . . 138<br>Task 9: Define the Dependencies. . . . . . . . . . . . . . . . . . . . . . . . . . 139<br>Task 10: Create a Test Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . 139<br>Task 11: Select the Test Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142<br>Task 12: Establish Defect Recording/Tracking Procedures . . . . 143<br>Task 13: Establish Change Request Procedures . . . . . . . . . . . . . 145<br>Task 14: Establish Version Control Procedures. . . . . . . . . . . . . . 147<br>Task 15: Define Configuration Build Procedures. . . . . . . . . . . . . 147<br>Task 16: Define Project Issue Resolution Procedures. . . . . . . . . 148<br>Task 17: Establish Reporting Procedures. . . . . . . . . . . . . . . . . . . 148<br>Task 18: Define Approval Procedures. . . . . . . . . . . . . . . . . . . . . . 149<br>Step 2: Define the Metric Objectives. . . . . . . . . . . . . . . . . . . . . . . . . 149<br>Task 1: Define the Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150<br>Task 2: Define the Metric Points . . . . . . . . . . . . . . . . . . . . . . . . . . 151<br>Step 3: Review/Approve the Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . 154<br>Task 1: Schedule/Conduct the Review . . . . . . . . . . . . . . . . . . . . . 154<br>Task 2: Obtain Approvals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154<br>13 Test Case Design (Do) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157<br>Step 1: Design Function Tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157<br>Task 1: Refine the Functional Test Requirements. . . . . . . . . . . . 157<br>Task 2: Build a Function/Test Matrix . . . . . . . . . . . . . . . . . . . . . . 159<br>Step 2: Design GUI Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163<br>Ten Guidelines for Good GUI Design. . . . . . . . . . . . . . . . . . . . . . . 164<br>Task 1: Identify the Application GUI Components . . . . . . . . . . . 165<br>Task 2: Define the GUI Tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165<br>xi<br><br>Software Testing and Continuous Quality Improvement<br>Step 3: Define the System/Acceptance Tests . . . . . . . . . . . . . . . . . . 167<br>Task 1: Identify Potential System Tests. . . . . . . . . . . . . . . . . . . . . 167<br>Task 2: Design System Fragment Tests. . . . . . . . . . . . . . . . . . . . . 168<br>Task 3: Identify Potential Acceptance Tests. . . . . . . . . . . . . . . . . 169<br>Step 4: Review/Approve Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169<br>Task 1: Schedule/Prepare for Review . . . . . . . . . . . . . . . . . . . . . . 169<br>Task 2: Obtain Approvals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169<br>14 Test Development (Do) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173<br>Step 1: Develop Test Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173<br>Task 1: Script the Manual/Automated GUI/Function Tests . . . . 173<br>Task 2: Script the Manual/Automated System Fragment <br>Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173<br>Step 2: Review/Approve Test Development . . . . . . . . . . . . . . . . . . . 174<br>Task 1: Schedule/Prepare for Review . . . . . . . . . . . . . . . . . . . . . . 174<br>Task 2: Obtain Approvals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174<br>15 Test Coverage through Traceability. . . . . . . . . . . . . . . . . . . . . . . 177<br>Use Cases and Traceability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180<br>16 Test Execution/Evaluation (Do/Check). . . . . . . . . . . . . . . . . . . . . 181<br>Step 1: Setup and Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181<br>Task 1: Regression Test the Manual/Automated Spiral Fixes. . . 181<br>Task 2: Execute the Manual/Automated New Spiral Tests. . . . . 182<br>Task 3: Document the Spiral Test Defects . . . . . . . . . . . . . . . . . . 183<br>Step 2: Evaluation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183<br>Task 1: Analyze the Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183<br>Step 3: Publish Interim Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184<br>Task 1: Refine the Test Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . 184<br>Task 2: Identify Requirement Changes . . . . . . . . . . . . . . . . . . . . . 185<br>17 Prepare for the Next Spiral (Act) . . . . . . . . . . . . . . . . . . . . . . . . . 187<br>Step 1: Refine the Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187<br>Task 1: Update the Function/GUI Tests. . . . . . . . . . . . . . . . . . . . . 187<br>Task 2: Update the System Fragment Tests . . . . . . . . . . . . . . . . . 188<br>Task 3: Update the Acceptance Tests. . . . . . . . . . . . . . . . . . . . . . 189<br>Step 2: Reassess the Team, Procedures, and Test Environment. . . . 189<br>Task 1: Evaluate the Test Team . . . . . . . . . . . . . . . . . . . . . . . . . . . 189<br>Task 2: Review the Test Control Procedures . . . . . . . . . . . . . . . . 189<br>Task 3: Update the Test Environment. . . . . . . . . . . . . . . . . . . . . . 190<br>Step 3: Publish Interim Test Report. . . . . . . . . . . . . . . . . . . . . . . . . . 191<br>Task 1: Publish the Metric Graphics . . . . . . . . . . . . . . . . . . . . . . . 191<br>Test Case Execution Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191<br>Defect Gap Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191<br>Defect Severity Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191<br>Test Burnout Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192<br>xii<br><br>Contents<br>18 Conduct the System Test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195<br>Step 1: Complete System Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . 195<br>Task 1: Finalize the System Test Types. . . . . . . . . . . . . . . . . . . . . 195<br>Task 2: Finalize System Test Schedule . . . . . . . . . . . . . . . . . . . . . 197<br>Task 3: Organize the System Test Team. . . . . . . . . . . . . . . . . . . . 197<br>Task 4: Establish the System Test Environment . . . . . . . . . . . . . 197<br>Task 5: Install the System Test Tools . . . . . . . . . . . . . . . . . . . . . . 200<br>Step 2: Complete System Test Cases. . . . . . . . . . . . . . . . . . . . . . . . . 200<br>Task 1: Design/Script the Performance Tests . . . . . . . . . . . . . . . 200<br>Monitoring Approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201<br>Probe Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202<br>Test Drivers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202<br>Task 2: Design/Script the Security Tests . . . . . . . . . . . . . . . . . . . 203<br>A Security Design Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203<br>Task 3: Design/Script the Volume Tests . . . . . . . . . . . . . . . . . . . . 204<br>Task 4: Design/Script the Stress Tests . . . . . . . . . . . . . . . . . . . . . 205<br>Task 5: Design/Script the Compatibility Tests. . . . . . . . . . . . . . . 206<br>Task 6: Design/Script the Conversion Tests. . . . . . . . . . . . . . . . . 206<br>Task 7: Design/Script the Usability Tests. . . . . . . . . . . . . . . . . . . 207<br>Task 8: Design/Script the Documentation Tests . . . . . . . . . . . . . 208<br>Task 9: Design/Script the Backup Tests . . . . . . . . . . . . . . . . . . . . 208<br>Task 10: Design/Script the Recovery Tests . . . . . . . . . . . . . . . . . 209<br>Task 11: Design/Script the Installation Tests. . . . . . . . . . . . . . . . 209<br>Task 12: Design/Script Other System Test Types . . . . . . . . . . . . 210<br>Step 3: Review/Approve System Tests . . . . . . . . . . . . . . . . . . . . . . . 211<br>Task 1: Schedule/Conduct the Review . . . . . . . . . . . . . . . . . . . . . 211<br>Task 2: Obtain Approvals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212<br>Step 4: Execute the System Tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . 212<br>Task 1: Regression Test the System Fixes . . . . . . . . . . . . . . . . . . 212<br>Task 2: Execute the New System Tests. . . . . . . . . . . . . . . . . . . . . 213<br>Task 3: Document the System Defects . . . . . . . . . . . . . . . . . . . . . 213<br>19 Conduct Acceptance Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215<br>Step 1: Complete Acceptance Test Planning . . . . . . . . . . . . . . . . . . 215<br>Task 1: Finalize the Acceptance Test Types. . . . . . . . . . . . . . . . . 215<br>Task 2: Finalize the Acceptance Test Schedule. . . . . . . . . . . . . . 215<br>Task 3: Organize the Acceptance Test Team . . . . . . . . . . . . . . . . 215<br>Task 4: Establish the Acceptance Test Environment . . . . . . . . . 217<br>Task 5: Install Acceptance Test Tools. . . . . . . . . . . . . . . . . . . . . . 218<br>Step 2: Complete Acceptance Test Cases. . . . . . . . . . . . . . . . . . . . . 218<br>Task 1: Subset the System-Level Test Cases . . . . . . . . . . . . . . . . 218<br>Task 2: Design/Script Additional Acceptance Tests . . . . . . . . . . 219<br>Step 3: Review/Approve Acceptance Test Plan . . . . . . . . . . . . . . . . 219<br>Task 1: Schedule/Conduct the Review . . . . . . . . . . . . . . . . . . . . . 219<br>Task 2: Obtain Approvals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220<br>xiii<br><br>Software Testing and Continuous Quality Improvement<br>Step 4: Execute the Acceptance Tests. . . . . . . . . . . . . . . . . . . . . . . . 220<br>Task 1: Regression Test the Acceptance Fixes. . . . . . . . . . . . . . . 220<br>Task 2: Execute the New Acceptance Tests . . . . . . . . . . . . . . . . . 220<br>Task 3: Document the Acceptance Defects . . . . . . . . . . . . . . . . . 221<br>20 Summarize/Report Spiral Test Results. . . . . . . . . . . . . . . . . . . . . 223<br>Step 1: Perform Data Reduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223<br>Task 1: Ensure All Tests Were Executed/Resolved . . . . . . . . . . . 223<br>Task 2: Consolidate Test Defects by Test Number . . . . . . . . . . . 223<br>Task 3: Post Remaining Defects to a Matrix. . . . . . . . . . . . . . . . . 223<br>Step 2: Prepare Final Test Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . 224<br>Task 1: Prepare the Project Overview. . . . . . . . . . . . . . . . . . . . . . 225<br>Task 2: Summarize the Test Activities. . . . . . . . . . . . . . . . . . . . . . 225<br>Task 3: Analyze/Create Metric Graphics. . . . . . . . . . . . . . . . . . . . 225<br>Defects by Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225<br>Defects by Tester . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227<br>Defect Gap Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227<br>Defect Severity Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227<br>Test Burnout Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227<br>Root Cause Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227<br>Defects by How Found . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230<br>Defects by Who Found. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230<br>Functions Tested and Not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230<br>System Testing Defect Types. . . . . . . . . . . . . . . . . . . . . . . . . . . 230<br>Acceptance Testing Defect Types. . . . . . . . . . . . . . . . . . . . . . . 232<br>Task 4: Develop Findings/Recommendations . . . . . . . . . . . . . . . 232<br>Step 3: Review/Approve the Final Test Report. . . . . . . . . . . . . . . . . 233<br>Task 1: Schedule/Conduct the Review . . . . . . . . . . . . . . . . . . . . . 233<br>Task 2: Obtain Approvals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236<br>Task 3: Publish the Final Test Report . . . . . . . . . . . . . . . . . . . . . . 236<br>SECTION IV TEST PROJECT MANAGEMENT. . . . . . . . . . . . . . . . . . . 237<br>21 Overview of General Project Management . . . . . . . . . . . . . . . . . 239<br>Define the Objectives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239<br>Define the Scope of the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240<br>Identify the Key Activities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240<br>Estimate Correctly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240<br>Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241<br>Manage People . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241<br>Leadership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242<br>Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242<br>Solving Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243<br>Continuous Monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243<br>Manage Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243<br>xiv<br><br>Contents<br>22 Test Project Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245<br>Understand the Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246<br>Test Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246<br>Test Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247<br>Identify and Improve Processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247<br>Essential Characteristics of a Test Project Manager. . . . . . . . . . . . 248<br>Requirement Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248<br>Gap Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248<br>Lateral Thinking in Developing Test Cases . . . . . . . . . . . . . . . . . 248<br>Avoid Duplication and Repetition. . . . . . . . . . . . . . . . . . . . . . . . . 249<br>Test Data Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249<br>Validate the Test Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . 249<br>Test to Destroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249<br>Analyze the Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249<br>Do Not Hesitate to Accept Help from Others. . . . . . . . . . . . . . . . 250<br>Convey Issues as They Arise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250<br>Improve Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250<br>Always Keep Updating Your Business Knowledge . . . . . . . . . . . 250<br>Learn the New Testing Technologies and Tools . . . . . . . . . . . . . 250<br>Deliver Quality. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251<br>Improve the Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251<br>Create a Knowledge Base. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251<br>Repeat the Success. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251<br>23 Test Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253<br>Finish-to-Start: (FS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255<br>Start-to-Start: (SS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255<br>Finish-to-Finish: (FF). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255<br>Start-to-Finish (SF). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255<br>Critical Activities for Test Estimation . . . . . . . . . . . . . . . . . . . . . . . . 255<br>Test Scope Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256<br>Test Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256<br>Test Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257<br>Test Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257<br>Test Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257<br>Execution/Run Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257<br>Factors Affecting Test Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . 257<br>Test Planning Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258<br>Test Execution and Controlling Effort. . . . . . . . . . . . . . . . . . . . . . . . 259<br>Test Result Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259<br>Effort Estimation — Model Project . . . . . . . . . . . . . . . . . . . . . . . . . . 259<br>24 Defect Monitoring and Management Process . . . . . . . . . . . . . . . 263<br>Defect Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264<br>Defect Meetings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265<br>xv<br><br>Software Testing and Continuous Quality Improvement<br>Defect Classifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265<br>Defect Priority. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266<br>Defect Category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266<br>Defect Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267<br>25 Integrating Testing into Development Methodology. . . . . . . . . . 269<br>Step 1. Organize the Test Team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270<br>Step 2. Identify Test Steps and Tasks to Integrate. . . . . . . . . . . . . . 270<br>Step 3. Customize Test Steps and Tasks . . . . . . . . . . . . . . . . . . . . . . 271<br>Step 4. Select Integration Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271<br>Step 5. Modify the Development Methodology . . . . . . . . . . . . . . . . 272<br>Step 6. Incorporate Defect Recording . . . . . . . . . . . . . . . . . . . . . . . . 272<br>Step 7. Train in Use of the Test Methodology. . . . . . . . . . . . . . . . . . 272<br>26 On-Site/Offshore Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275<br>Step 1: Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275<br>Step 2: Determine the Economic Tradeoffs. . . . . . . . . . . . . . . . . . . . 276<br>Step 3: Determine the Selection Criteria. . . . . . . . . . . . . . . . . . . . . . 276<br>Project Management and Monitoring . . . . . . . . . . . . . . . . . . . . . . . . 276<br>Outsourcing Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277<br>On-Site Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278<br>Offshore Activities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278<br>Implementing the On-Site/Offshore Model . . . . . . . . . . . . . . . . . . . . 279<br>Knowledge Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279<br>Detailed Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280<br>Milestone-Based Transfer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280<br>Steady State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280<br>Application Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280<br>Relationship Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281<br>Standards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282<br>Benefits of On-Site/Offshore Methodology . . . . . . . . . . . . . . . . . . . . 283<br>On-Site/Offshore Model Challenges. . . . . . . . . . . . . . . . . . . . . . . . 285<br>Out of Sight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br>Establish Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br>Security Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br>Project Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br>Management Overhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br>Cultural Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br>Software Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br>The Future of Onshore/Offshore . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286<br>SECTION V MODERN SOFTWARE TESTING TOOLS . . . . . . . . . . . . . 287<br>27 A Brief History of Software Testing . . . . . . . . . . . . . . . . . . . . . . . 289<br>Evolution of Automated Testing Tools . . . . . . . . . . . . . . . . . . . . . . . 293<br>Static Capture/Replay Tools (without Scripting Language). . . . 294<br>Static Capture/Replay Tools (with Scripting Language). . . . . . . 294<br>xvi<br><br>Contents<br>Variable Capture/Replay Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . 295<br>Functional Decomposition Approach . . . . . . . . . . . . . . . . . . . 295<br>Test Plan Driven (“Keyword”) Approach. . . . . . . . . . . . . . . . . 296<br>Historical Software Testing and Development Parallels. . . . . . . . . 298<br>Extreme Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299<br>28 Software Testing Trends. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301<br>Automated Capture/Replay Testing Tools . . . . . . . . . . . . . . . . . . . . 301<br>Test Case Builder Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302<br>Advanced Leading-Edge Automated Testing Tools. . . . . . . . . . . . . 302<br>Advanced Leading-Edge Test Case Builder Tools . . . . . . . . . . . . . . 304<br>Necessary and Sufficient Conditions. . . . . . . . . . . . . . . . . . . . . . . . . 304<br>Test Data/Test Case Generation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305<br>Sampling from Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305<br>Starting from Scratch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306<br>Seeding the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306<br>Generating Data Based upon the Database . . . . . . . . . . . . . . . . . 307<br>Generating Test Data/Test Cases Based upon the <br>Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308<br>29 Taxonomy of Testing Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311<br>Testing Tool Selection Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311<br>Vendor Tool Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312<br>When You Should Consider Test Automation . . . . . . . . . . . . . . . . . 312<br>When You Should NOT Consider Test Automation. . . . . . . . . . . . . 320<br>30 Methodology to Evaluate Automated Testing Tools . . . . . . . . . . 323<br>Step 1: Define Your Test Requirements. . . . . . . . . . . . . . . . . . . . . . . 323<br>Step 2: Set Tool Objectives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323<br>Step 3a: Conduct Selection Activities for Informal <br>Procurement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324<br>Task 1: Develop the Acquisition Plan . . . . . . . . . . . . . . . . . . . . . . 324<br>Task 2: Define Selection Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . 324<br>Task 3: Identify Candidate Tools . . . . . . . . . . . . . . . . . . . . . . . . . . 324<br>Task 4: Conduct the Candidate Review . . . . . . . . . . . . . . . . . . . . 325<br>Task 5: Score the Candidates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325<br>Task 6: Select the Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325<br>Step 3b: Conduct Selection Activities for Formal <br>Procurement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326<br>Task 1: Develop the Acquisition Plan . . . . . . . . . . . . . . . . . . . . . . 326<br>Task 2: Create the Technical Requirements Document . . . . . . . 326<br>Task 3: Review Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326<br>Task 4: Generate the Request for Proposal . . . . . . . . . . . . . . . . . 326<br>Task 5: Solicit Proposals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326<br>Task 6: Perform the Technical Evaluation . . . . . . . . . . . . . . . . . . 327<br>Task 7: Select a Tool Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327<br>xvii<br><br>Software Testing and Continuous Quality Improvement<br>Step 4: Procure the Testing Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327<br>Step 5: Create the Evaluation Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . 327<br>Step 6: Create the Tool Manager’s Plan. . . . . . . . . . . . . . . . . . . . . . . 328<br>Step 7: Create the Training Plan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328<br>Step 8: Receive the Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328<br>Step 9: Perform the Acceptance Test. . . . . . . . . . . . . . . . . . . . . . . . . 329<br>Step 10: Conduct Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329<br>Step 11: Implement Modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . 329<br>Step 12: Train Tool Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329<br>Step 13: Use the Tool in the Operating Environment. . . . . . . . . . . . 330<br>Step 14: Write the Evaluation Report. . . . . . . . . . . . . . . . . . . . . . . . . 330<br>Step 15: Determine Whether Goals Have Been Met. . . . . . . . . . . . . 330<br>APPENDICES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331<br>A Spiral Testing Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333<br>B Software Quality Assurance Plan. . . . . . . . . . . . . . . . . . . . . . . . . 343<br>C Requirements Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345<br>D Change Request Form. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347<br>E Test Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349<br>E1: Unit Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349<br>E2: System/Acceptance Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . 349<br>E3: Requirements Traceability Matrix. . . . . . . . . . . . . . . . . . . . . . . . 351<br>E4: Test Plan (Client/Server and Internet Spiral Testing). . . . . . . . 353<br>E5: Function/Test Matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355<br>E6: GUI Component Test Matrix <br>(Client/Server and Internet Spiral Testing). . . . . . . . . . . . . . . . . . . . 355<br>E7: GUI-Based Functional Test Matrix <br>(Client/Server and Internet Spiral Testing). . . . . . . . . . . . . . . . . . . . 356<br>E8: Test Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357<br>E9: Test Case Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357<br>E10: Test Log Summary Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359<br>E11: System Summary Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361<br>E12: Defect Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362<br>E13: Test Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364<br>E14: Retest Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366<br>E15: Spiral Testing Summary Report <br>(Client/Server and Internet Spiral Testing). . . . . . . . . . . . . . . . . . . . 368<br>E16: Minutes of the Meeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368<br>E17: Test Approvals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370<br>E18: Test Execution Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371<br>E19: Test Project Milestones. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372<br>E20: PDCA Test Schedule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373<br>E21: Test Strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374<br>xviii<br><br>Contents<br>E22: Clarification Request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377<br>E23: Screen Data Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378<br>E24: Test Condition versus Test Case . . . . . . . . . . . . . . . . . . . . . . . . 379<br>E25: Project Status Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380<br>E26: Test Defect Details Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381<br>E27: Defect Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383<br>E28: Test Execution Tracking Manager. . . . . . . . . . . . . . . . . . . . . . . 383<br>E29: Final Test Summary Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384<br>F Checklists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387<br>F1: Requirements Phase Defect Checklist. . . . . . . . . . . . . . . . . . . . . 388<br>F2: Logical Design Phase Defect Checklist . . . . . . . . . . . . . . . . . . . . 389<br>F3: Physical Design Phase Defect Checklist . . . . . . . . . . . . . . . . . . . 390<br>F4: Program Unit Design Phase Defect Checklist. . . . . . . . . . . . . . . 393<br>F5: Coding Phase Defect Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . 394<br>F6: Field Testing Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396<br>F7: Record Testing Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398<br>F8: File Test Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400<br>F9: Error Testing Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401<br>F10: Use Test Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403<br>F11: Search Test Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404<br>F12: Match/Merge Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405<br>F13: Stress Test Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407<br>F14: Attributes Testing Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . . 409<br>F15: States Testing Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411<br>F16: Procedures Testing Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . 412<br>F17: Control Testing Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413<br>F18: Control Flow Testing Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . 418<br>F19: Testing Tool Selection Checklist . . . . . . . . . . . . . . . . . . . . . . . . 419<br>F20: Project Information Gathering Checklist . . . . . . . . . . . . . . . . . 421<br>F21: Impact Analysis Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423<br>F22: Environment Readiness Checklist. . . . . . . . . . . . . . . . . . . . . . . 425<br>F23: Project Completion Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . 427<br>F24: Unit Testing Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429<br>F25: Ambiguity Review Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . . 433<br>F26: Architecture Review Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . 435<br>F27: Data Design Review Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . 436<br>F28: Functional Specification Review Checklist. . . . . . . . . . . . . . . . 437<br>F29: Prototype Review Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442<br>F30: Requirements Review Checklist. . . . . . . . . . . . . . . . . . . . . . . . . 443<br>F31: Technical Design Review Checklist . . . . . . . . . . . . . . . . . . . . . . 447<br>F32: Test Case Preparation Review Checklist. . . . . . . . . . . . . . . . . . 449<br>G Software Testing Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451<br>G1: Basis Path Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451<br>PROGRAM: FIELD-COUNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451<br>xix<br><br>Software Testing and Continuous Quality Improvement<br>G2: Black-Box Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452<br>Extra Program Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453<br>G3: Bottom-Up Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453<br>G4: Boundary Value Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453<br>Numeric Input Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Field Ranges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Numeric Output Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Output Range of Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Nonnumeric Input Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Tables or Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Number of Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Nonnumeric Output Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Tables or Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>Number of Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>GUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>G5: Branch Coverage Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455<br>PROGRAM: FIELD-COUNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455<br>G6: Branch/Condition Coverage Testing. . . . . . . . . . . . . . . . . . . . . . 455<br>PROGRAM: FIELD-COUNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456<br>G7: Cause-Effect Graphing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456<br>Cause-Effect Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457<br>Specification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458<br>Causes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458<br>Effects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458<br>G8: Condition Coverage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460<br>PROGRAM: FIELD-COUNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460<br>G9: CRUD Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461<br>G10: Database Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461<br>Integrity Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461<br>Entity Integrity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462<br>Primary Key Integrity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462<br>Column Key Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462<br>Domain Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463<br>User-Defined Integrity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463<br>Referential Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463<br>Data Modeling Essentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464<br>What Is a Model?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465<br>Why Do We Create Models?. . . . . . . . . . . . . . . . . . . . . . . . . . . . 465<br>Tables — A Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466<br>Table Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467<br>Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467<br>Rows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467<br>Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467<br>Entities — A Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467<br>xx<br><br>Contents<br>Identification — Primary Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468<br>Compound Primary Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468<br>Null Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468<br>Identifying Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469<br>Entity Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469<br>Relationships — A Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470<br>Relationship Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470<br>One-to-One. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470<br>One-to-Many . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472<br>Many-to-Many . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473<br>Multiple Relationships. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475<br>Entities versus Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . 475<br>Attributes — A Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476<br>Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477<br>Domain Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478<br>Attributes versus Relationships. . . . . . . . . . . . . . . . . . . . . . . . 478<br>Normalization — What Is It? . . . . . . . . . . . . . . . . . . . . . . . . . . . 479<br>Problems of Unnormalized Entities . . . . . . . . . . . . . . . . . . . . . 479<br>Steps in Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480<br>First Normal Form (1NF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480<br>Second Normal Form (2NF). . . . . . . . . . . . . . . . . . . . . . . . . . . . 482<br>Third Normal Form (3NF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484<br>Model Refinement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485<br>Entity Subtypes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486<br>A Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486<br>Referential Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486<br>Dependency Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488<br>Constraint Rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488<br>Recursion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489<br>Using the Model in Database Design . . . . . . . . . . . . . . . . . . . . 491<br>Relational Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491<br>G11: Decision Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492<br>PROGRAM: FIELD-COUNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492<br>G12: Desk Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493<br>G13: Equivalence Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493<br>Numeric Input Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Field Ranges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Numeric Output Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Output Range of Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Nonnumeric Input Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Tables or Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Number of Items. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Nonnumeric Output Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Tables or Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>Number of Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>xxi<br><br>Software Testing and Continuous Quality Improvement<br>G14: Exception Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>G15: Free Form Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494<br>G16: Gray-Box Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495<br>G17: Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496<br>G18: Inspections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496<br>G19: JADs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497<br>G20: Orthogonal Array Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498<br>G21: Pareto Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499<br>G22: Positive and Negative Testing . . . . . . . . . . . . . . . . . . . . . . . . . . 501<br>G23: Prior Defect History Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . 502<br>G24: Prototyping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502<br>Cyclic Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502<br>Fourth-Generation Languages and Prototyping. . . . . . . . . . . . . . 503<br>Iterative Development Accounting . . . . . . . . . . . . . . . . . . . . . . . . 504<br>Evolutionary and Throwaway . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504<br>Application Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505<br>Prototype Systems Development . . . . . . . . . . . . . . . . . . . . . . . . . 505<br>Data-Driven Prototyping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505<br>Replacement of the Traditional Life Cycle. . . . . . . . . . . . . . . . . . 506<br>Early-Stage Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506<br>User Software Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507<br>G25: Random Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507<br>G26: Range Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507<br>G27: Regression Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509<br>G28: Risk-Based Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509<br>G29: Run Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510<br>G30: Sandwich Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510<br>G31: Statement Coverage Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . 511<br>PROGRAM: FIELD-COUNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511<br>G32: State Transition Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511<br>PROGRAM: FIELD-COUNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512<br>G33: Statistical Profile Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512<br>G34: Structured Walkthroughs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512<br>G35: Syntax Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514<br>G36: Table Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514<br>G37: Thread Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515<br>G38: Top-Down Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515<br>G39: White-Box Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516<br>Bibliography. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517<br>Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523<br>Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Table of Contents xii There's more... 214 Inserting shortcodes into sidebar widgets 215 Displaying Adsense ads to search engines visitors only 215 Getting ready 216 How to do it 216 How it works 217 There's more... 217 Managing who Sees Ads 218 Getting ready 218 How to do it 219 How it works 220 There's more... 220 Advanced conditions 221 Inserting ads in your RSS feeds 221 Getting ready 222 How to do it 222 Option 1: Using a hack 222 Option 2: Using a plugin 223 How it works 224 There's more... 224 Solving problems with Feedburner 224 Redirecting your WordPress RSS feeds to Feedburner 225 Getting ready 225 How to do it 225 Option 1: Using a hack 226 How it works 226 Option 2: Using a plugin 226 How it works 227 There's more... 227 Plugin versus hack 227 Show your blog stats to find advertisers 228 Getting ready 228 How to do it 228 How it works 230 There's more... 230 Managing your 125*125 px ad spots 230 Enhancing your Advertise page by adding Paypal subscriptions 230 Getting ready 231 How to do it 231 There's more... 233 Telling advertisers how to unsubscribe 233 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents xiii Chapter 10: Enhancing User Experience 235 Replacing the Next and Previous links by a paginator 236 Getting ready 236 How to do it 236 How it works 238 Highlighting searched text in search results 238 Getting ready 238 How to do it 238 How it works 239 Using the CSS sliding doors technique within WordPress 239 Getting ready 239 How to do it 241 Applying this hack to pages 241 Applying this hack to categories 242 How it works 243 Creating a drop-down menu for your categories 243 Getting ready 243 How to do it 244 Step 1: PHP and HTML 244 Step 2: The CSS 245 Step 3: Optional JavaScript 246 How it works 247 There's more... 247 Creating a horizontal drop-down menu 247 Adding a breadcrumb to your theme 250 Getting ready 250 How to do it 250 How it works 251 There's more... 252 Using a hack to display breadcrumbs 252 Displaying related posts 253 Getting ready 253 How to do it 254 How it works 255 Display tabs on your sidebar 255 Getting ready 256 How to do it 256 How it works 256 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents xiv Chapter 11: Make your Blog Stand Out 257 Rewarding your commentators to get more comments 257 Making your blog dofollow with the 258 NoFollow Free plugin 258 The NoFollow Free plugin 258 Using the Top Commentators widget 260 Installing the Top Commentators widget 260 Conclusion 262 Adding a print stylesheet to your blog 262 Getting ready 263 How to do it 263 How it works 264 Print button 264 Print stylesheet inclusion and selection 264 Print stylesheet 264 Using WordPress as a photoblog 266 Photoblog themes for WordPress 266 Photoblog 266 Nishita 267 Fotolog 268 Creating your own Photoblog theme 268 Getting ready 268 How to do it 269 How it works 272 Creating an iPhone-friendly version of your blog 272 Getting ready 272 How to do it 273 How it works 273 There's more... 273 Using an header image 274 Modify the title and slogan 274 Integrating a forum in your WordPress blog 274 Getting ready 275 How to do it 276 How it works 277 There's more... 277 Skins 277 Moderators 277 User groups 278 Index 279 Table of Contents Preface 1 Chapter 1: Getting Ready to Cook with WordPress 5 Using built-in WordPress tools 6 Managing media files with the Media Library 6 Getting ready 6 How to do it 7 Deleting media 7 Bulk media deletion 8 How it works 9 Live editing themes with the built-in Theme Editor 9 Getting ready 9 How to do it 10 How it works 10 There's more... 10 Editing plugins with the WordPress built-in Plugin Editor 11 Getting ready 11 How to do it 12 How it works 12 There's more... 12 Managing authors and users with the User Manager 12 Getting ready 12 How to do it 13 Deleting users 13 Editing user details 13 How it works 14 Importing and exporting content with the Import and Export tool 14 Getting ready 14 How to do it 14 Importing content 15 Exporting content 17 How it works 18 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents ii Chapter 2: Finding, Installing, and Tweaking Themes 19 Installing a theme 20 Getting ready 20 How to do it 20 There's more... 22 Classic themes 22 Advanced themes 28 Premium themes 34 Lists of themes 40 Important notes about themes 41 Chapter 3: Get the most out of your WordPress Theme 43 Modifying your theme colors 44 Getting ready 44 How to do it 45 How it works 45 There's more... 46 Modifying your theme fonts 46 Getting ready 46 How to do it 47 There's more... 47 Tips and things to know about fonts 47 Creating and integrating a favicon 48 Getting ready 48 Favicon format 48 How to do it 48 How it works 49 Integrating your own logo 49 Getting ready 50 How to do it 50 How it works 51 There's more... 51 Adding a link to the homepage 52 Adding social bookmarking buttons to your theme 52 Getting ready 52 How to do it 52 How it works 53 There's more... 53 Using CSS to style the social bookmarking widget 53 Adding Del.icio.us live count 54 Code explanation 55 Integrating Feedburner feeds on your theme 55 How to do it 56 How it works 57 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents iii Integrating Twitter on your theme using the Twitter Tools plugin 57 Getting ready 58 How to do it 59 How it works 59 Displaying your Twitter entries on your blog, using a page template 59 Getting ready 59 How to do it 60 How it works 62 Customizing WordPress admin login page 62 Plugin versus hack 62 How to do it 63 How it works 64 Using conditional tags to display content on specific pages 64 Getting ready 64 How to do it 64 How it works? 66 There's more... 66 Special parameters 67 Using page templates in your theme 67 Getting ready 68 How to do it 68 How it works 69 Creating an archive page 69 Getting ready 69 How to do it 69 How it works 70 There's more... 71 Creating a custom 404 error page 71 Getting ready 71 How to do it 72 How it works 72 There's more... 73 Using a static page as a homepage 73 Getting ready 73 How to do it 73 How it works 74 There's more... 74 Creating a Featured Posts block on your homepage 74 Getting ready 75 How to do it 75 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents iv How it works 76 There's more... 76 Making your new posts stands out with a custom style 76 Getting ready 77 How to do it 77 How it works 78 There's more... 79 Chapter 4: Doing anything with Plugins and Widgets 81 Installing plugins 82 Getting ready 82 How to do it 82 How it works 83 Getting rid of comment spams with Akismet 83 Getting ready 83 How to do it 83 How it works 84 Backing up your database with WP Database Backup 84 Getting ready 84 How to do it 84 How it works 85 There's more... 85 Scheduling automatic backups 85 How it works 85 There's more… 85 Optimizing your blog performances with WP Super Cache 86 Getting ready 86 How to do it 86 How it works 87 There's more... 87 Prevent URLs from being cached 87 Adding redirects for changed Permalinks 88 Getting ready 88 How to do it 88 How it works 89 There's more... 89 Using redirects for affiliate marketing and cloaking 89 Get more comments with the Subscribe to Comments plugin 89 How to do it 89 How it works 90 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents v There's more... 90 Accessing real time statistics with WordPress.com Stats 90 Getting ready 91 How to do it 91 How it works 91 Monetizing your blog with ISIS Ads Management 92 Getting ready 92 How to do it 92 How it works 93 Extending WordPress search with Search Unleashed 93 Getting ready 93 How to do it 93 How it works 94 Installing widgets 95 Plugins versus widgets 95 Getting ready 95 How to do it 96 How it works 96 There's more... 96 Installing downloaded widgets 97 Make your sidebar widget-ready 97 Getting ready 97 How to do it 97 How it works 98 Creating two (or more) different widget-ready zones 98 Getting ready 99 How to do it 99 How it works 100 There's more... 100 Modifying core widgets 101 Getting ready 101 How to do it 101 How it works 102 Creating your own widget 102 Getting ready 102 How to do it 102 How it works 103 There's more... 104 Complete widget code 104 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents vi Chapter 5: Displaying Posts 107 Getting posts within the WordPress loop 108 Getting ready 108 How to do it 108 How it works 108 Retrieving posts from a particular category only 108 Getting ready 109 How to do it 110 How it works 110 Getting an exact number of posts 110 Getting ready 110 How to do it 110 How it works 111 Retrieving posts by date 111 Getting ready 111 How to do it 111 How it works 112 Getting posts published today 112 Getting ready 112 How to do it 112 How it works 113 Getting posts published exactly a year ago 113 Getting ready 113 How to do it 113 How it works 114 Using two different loops without duplicate posts 114 How to do it 115 How it works 115 Complete code 116 Accessing post data outside of the WordPress loop 116 Getting ready 116 How to do it 116 How it works 117 Usage 118 Accessing permalinks outside the loop 118 Getting ready 118 How to do it 118 How it works 119 There's more... 119 Using the $post global variable 119 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents vii Displaying any RSS feed on your blog 110 Getting ready 120 How to do it 120 How it works 120 There's more... 120 Displaying thumbnails on your blog homepage 121 Getting ready 121 How to do it 121 How it works 122 There's more... 123 Defining a default image 123 Alternating background color on post list 123 Getting ready 124 How to do it 124 How it works 124 Displaying posts in two columns 125 Getting ready 125 How to do it 125 How it works 126 Save time by using WordPress shortcodes 126 Getting ready 126 How to do it 127 How it works 127 There's more... 128 Creating a nice download message box using a shortcode 128 Getting ready 129 How to do it 129 How it works 130 Chapter 6: Managing and Enhancing Multi-Author Blogs 131 Creating an author page template 132 Getting ready 132 How to do it 132 How it works 133 There's more... 134 Displaying a custom login form in your blog's sidebar 134 Getting ready 135 How to do it 135 How it works 136 Adding a control panel to your blog's sidebar 137 Getting ready 137 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents viii How to do it 137 How it works 138 There's more... 138 Adding a login form and a control panel 139 Configuring author roles 141 Getting ready 141 How to do it 141 How it works 142 There's more... 142 Controlling what authors can do 142 Displaying author-related information on posts 145 Getting ready 145 How to do it 146 How it works 146 There's more... 147 Displaying author picture on posts 147 Getting ready 147 How to do it 148 How it works 148 There's more... 148 Displaying the author's gravatar picture on posts 149 Getting ready 149 How to do it 151 How it works 151 Adding moderation buttons to the comments 151 Getting ready 152 How to do it 152 How it works 153 Getting notified when a new draft is saved 153 Getting ready 153 How to do it 154 How it works 154 Allowing multiple authors on posts 154 Getting ready 154 How to do it 155 How it works 155 Displaying a list of all of the authors 156 Getting ready 156 How to do it 156 How it works 156 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents ix There's more... 156 Controlling the wp_list_authors() function 157 Chapter 7: Securing your WordPress Blog 159 Creating manual backups of your WordPress blog 160 Getting ready 160 How to do it 160 How it works 161 There's more... 161 Restoring a MySQL backup 161 Getting ready 162 How to do it 162 How it works 163 Creating backups of your WordPress files 163 Getting ready 163 How to do it 164 How it works 164 Using a shell script to create automatic files and database backups 164 Getting ready 164 How to do it 164 How it works 165 Securing your plugins directory 165 Getting ready 165 How to do it 166 How it works 166 Removing a WordPress version from the theme files 166 Getting ready 167 How to do it 167 How it works 167 Getting rid of the Administrator account 168 Getting ready 168 How to do it 168 How it works 169 Automatically forbid login after some failed login attempt 169 Getting ready 169 How to do it 169 How it works 170 Protecting the wp-admin directory brute force with the help of AskApache 171 Getting ready 171 How to do it 171 How it works 173 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents x Restricting wp-admin directory to your IP address 174 Getting ready 174 How to do it 174 How it works 175 There's more... 175 Allowing access to more than one IP 175 Testing your blog security 176 Getting ready 176 How to do it 176 How it works 178 There's more... 179 Deny comment posting on no referrer requests 179 Getting ready 179 How to do it 180 The .htaccess method 180 The PHP method 180 How it works 180 Chapter 8: SEO Tips and Tricks to Get More Visits 181 Optimizing your permalinks for SEO 182 Getting ready 182 How to do it 182 How it works 183 There's more... 183 Structure tags reference 184 Further optimizing your permalinks 184 Migrating your permalinks safely 185 Getting ready 186 How to do it 186 How it works 186 Optimize your title tag for SEO 187 Getting ready 187 How to do it 188 How it works 189 Create Meta descriptions for your posts 189 Getting ready 189 How to do it 190 How it works 190 There's more... 190 A more sophisticated code by using custom fields 190 Avoid duplicate content with a robot.txt file 191 Getting ready 191 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com Table of Contents xi How to do it 191 How it works 192 There's more... 192 PHP code to avoid duplicate content 192 Adding a sitemap to your blog 193 Getting ready 193 How sitemaps works 193 General rules for creating sitemaps 194 How to do it 195 How it works 196 Basic options 196 Using Google Webmaster Tools 197 How to do it 197 How it works 198 There's more... 198 Overview 199 Statistics 199 Links 199 Sitemaps 200 Tools 200 Pinging third party services 200 Getting ready 200 How to do it 201 How it works 202 There's more... 202 Services to ping 202 Enhancing your WordPress blog SEO with the All in One SEO Pack plugin 203 Getting ready 203 How to do it 204 There's more... 206 Five more tips for a better SEO 206 Chapter 9: Making Money with WordPress 209 Integrating Adsense to your WordPress blog 210 Getting ready 210 How to do it 211 Method 1: Using your Adsense code in your theme files 211 Method 2: Using a text widget to display your Adsense ads 212 How it works 212 Display ads anywhere in your posts by using WordPress shortcodes 213 Getting ready 213 How to do it 213 How it works 214 This material is copyright and is licensed for the sole use by Mauricio Esquenazi on 21st July 2009 10 Kenmare St. #4, , New York, , 10012 Download at Boykma.Com
Table of Contents Preface 1 Chapter 1: Plugin Basics 5 Safety first 6 Automatic install versus manual install 6 Automatic plugin installation 6 Plugin detail 8 Downloading, unpacking, installing 9 Activating the plugin 9 Connection Information required 10 Manual installation 10 Manually installing a plugin with a Mac 11 Transferring a plugin 12 Manually installing a plugin on Windows 13 Creating a bookmark with WinSCP 16 Transferring a plugin to your blog 16 Activating your plugin 17 Finding a plugin's settings 17 How plugins work 17 Managing plugins 18 Keeping your plugins up-to-date 19 Learn by tinkering 19 WordPress plugin API 19 PHP references 19 CSS 19 JavaScript 20 Troubleshooting plugins 20 Editing plugins 21 Summary 22 Table of Contents [ ii ] Chapter 2: Generating Content 23 GD Star Rating 23 Fixing the default ratings 24 Turning off Thumbs Up/Thumbs Down on posts 24 Turning off Star Ratings on comments 24 Better Tag Cloud 25 Yet Another Related Posts Plugin (YARPP) 26 My Page Order 27 Get Recent Comments 27 Viper's Video Quicktags 28 WP Greet Box 29 NextGen Gallery 30 Setting up your first gallery 31 Adding your gallery to a post or a page 32 Zemanta 32 CForms II 34 CForms administration 35 Modifying the default form 36 Adding your form to a page, post, or widget 36 Advanced CForms customizations 37 File upload settings 37 Messages, text, and button label 37 Core Form Admin / e-mail options 37 Admin e-mail message options 37 Auto confirmation 37 Multi-part / multi-page forms 37 Tell-A-Friend form support 38 WP comment feature 38 Third-party read-notification support 38 MapPress—Google maps 38 Adding a map to a post or page 39 WP-O-Matic 40 Creating your first campaign 40 Adding feeds 41 Categories 42 Understanding WP-O-Matic's options 42 Search unleashed 43 Setting up your search index 44 Creating your first index 45 WP Web Scrapper 46 Copyright warning 47 Adding a scrapping 47 Summary 48 Table of Contents [ iii ] Chapter 3: Sharing Content 49 TweetMeme 49 Setting up TweetMeme 50 Wordbook 51 WP Download Manager 52 Adding a new download 53 Inserting a download into a post 54 Twiogle Twitter Commenter 54 ShareThis 55 Setting up ShareThis 56 Wibiya Bar - Beta 57 Installing the Wibiya bar 58 WP Facebook Connect 59 Creating an app ID for your blog 59 Adding the connect button to your comments 60 Twitter Friendly Links 61 Feedburner Feedsmith 62 Burning your feed 63 Create a Google account 63 Verify your blog's feed URL 63 Burn your feed 63 Name your feed 64 Configuring WP-Feedburner 64 SendIt 65 SendIt overview 66 Creating your first newsletter 67 Adding subscribers 67 Automatic import 67 SendIt Widget 68 Sending a mail 69 Subscribe-Remind 69 Sociable 70 Understanding social options 71 Disabling sprite usage for images 71 Disabling alpha mask on the share toolbar 71 Tagline 71 Position 71 Use Text Links 72 Image Directory 72 Use Thisbox/iFrame on links 72 Open in New Window 72 Awe.sm 72 Summary 73 Table of Contents [ iv ] Chapter 4: Style and Function 75 About Me Widget 76 Setting up your About Me Widget 76 Category Posts Widget 77 After the Deadline 79 Using After the Deadline 80 WordPress Mobile Pack 80 Mobile themes 82 Browser detection and domain detection 83 Important Mobile Themes settings 83 WPTouch 84 Web App icon 86 Page icons 86 Creating your own icon 86 Push notifications 86 WP-Prowl 86 Setting up WP-Prowl 88 Favicons 88 Setting up your Favicon 90 Picking from the gallery 90 Use your Gravatar as Favicon 91 Using a remote icon 91 Theme Switcher 91 Advanced marketing use 92 Image Widget 92 Post Layout 94 Inserting content 95 Breadcrumb NavXT 96 Inserting the Breadcrumb 97 Basic Breadcrumb 97 Exec-PHP 97 Using Exec-PHP to list your latest tweets 98 Summary 99 Chapter 5: Building a Community with BuddyPress 101 Before setting up BuddyPress 101 Sticking to your Community Purpose 102 BuddyPress 102 BuddyPress features 103 Smooth member signup 103 Twitter-like posting 104 Profiles 105 Table of Contents [ v ] Member communication 105 Forums 106 Groups 106 Members Directory 107 BuddyPress themes 108 Cosmic Buddy 108 BP Nicey 109 Sense and Sensibility BP 1.6 110 More themes 110 BuddyPress plugins 111 Group Documents 111 TweetStream 112 Connecting to Twitter 112 BuddyPress Album+ 114 Setting up your Community Groups 115 Step 1: Group details 115 Step 2: Settings 116 Step 3: Avatar 116 Tips for driving traffic to your community 117 Friends and family 117 Social networks 117 Twitter 118 Facebook 119 Google AdWords 120 Google search 120 Summary 122 Chapter 6: Generating Revenue 123 Donation Can 124 Zazzle Widget 125 Setting up the Zazzle Widget 126 AmazonFeed 127 Setting up AmazonFeed 128 Configuration 128 Post / page specific items 128 Advertising Manager 128 Creating a Google AdSense Ad 130 Creating your first ad in Advertising Manager 132 Adding the Widget 132 iTunes Affiliate Link Maker (iTALM) 133 Adding links to a post 134 Table of Contents [ vi ] WP e-Commerce, FREE Version 135 Setting up WP e-Commerce 136 Adding a digital product 137 Product Detail 137 Categories and Tags 137 Price and Stock Control 138 Shipping Details 138 Product Images 139 Product Download 140 Setting up your Payment Gateway 140 Web Invoice—invoicing and billing for WordPress 141 Setting up an invoice 143 Select the client 143 Client Information 143 Recurring Billing 143 Invoice Details 144 Publish 144 My Ad Manager 144 Creating the Advertise Here Page 145 Adding the Widget 146 Setting up your House Ads 146 Summary 147 Chapter 7: Working with Multiple Authors 149 Authors Widget 149 Author Spotlight 151 Styling the Author widget 152 Blog Metrics 152 Cimy User Extra Fields 153 Pre-Publish Reminder 154 Edit Flow 155 Audit Trail 157 WP-CMS Post Control 158 Guest Blogger 159 Adding a new article import 160 Subscribe to Author Posts Feed 161 Author Advertising 162 Setting up Author Advertising widget 163 The Author Page 164 Advertising code 164 Co-Author Plus 165 Private Messages for WordPress 167 Summary 168 Table of Contents [ vii ] Chapter 8: Security and Maintenance 169 Security basics 169 Passwords 170 Update often 170 Back up often 170 Limit Login Attempts 170 Setting up Limit Login Attempts 171 Lockout 172 Secure WordPress 172 Secure WordPress's options explained 173 Akismet 174 Bad Behavior 176 Upload+ 177 WP Security Scan 178 Latest version 179 Table prefix 179 Hiding Version # and Meta Tag ID 179 WordPress DB Errors 180 .htaccess in Admin folder 180 WP-DBManager 180 Understanding your database's health 181 What is a database? 181 What is MySQL? 181 How does WordPress use MySQL? 181 Repair, Optimize, and Backup 181 WP-DB-Backup 182 WordPress Backup 183 Maintenance Mode 183 Customizing the maintenance notice 184 WP-Optimize 185 Quick Cache 186 Quick Cache Options explained 187 Error Reporting 188 Auto Delete old log files 189 Configuration 189 Summary 189 Chapter 9: Power Admin 191 Fluency Admin 192 Quick key access 193 Styling the login screen 193 StatPress 194 Table of Contents [ viii ] Key datapoints 195 Latest Referrers 195 Search Terms 196 Operating Systems 196 Browsers Used 197 Spy View 197 404 Notifier 198 Shockingly Big IE6 Warning 199 Admin Links Widget 200 WordPress Admin Bar 201 Code Editor 202 WordPress Admin QuickMenu 203 Setting up your links 204 Email Users 204 E-mail ideas 205 Exclusive e-mailer 206 Special deals and offers 206 Helping a cause 206 Tips and tricks 206 Broken Link Checker 206 Admin Management Xtended 207 Understanding the interface 208 Menu Manager 209 Simple Tags 210 Configuring third party Taxonomy Services 211 Redirection 212 Widget Logic 213 Commonly used logic 214 Summary 214 Chapter 10: Time for Action 215 The open source business model 215 WordPress for prototyping 216 Real business models with WordPress 216 Selling digital goods 216 Selling themes 217 Selling plugins 218 Selling advertising spots 219 Job board 220 Corporate blogging software 220 Hosting WordPress 221 Continuing education 222 Summary 223 Index 225

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值