Robot進(jìn)行數據庫的并發(fā)測試[1] 軟件測試
第一步:創(chuàng )建演示程序:打開(kāi)SQL SERVER查詢(xún)分析器,在SQL SERVER測試數據庫中執行下列腳本(腳本執行操作:創(chuàng )建表testtable,并插入一條記錄;創(chuàng )建存儲過(guò)程test):
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Test]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Test]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[testtable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[testtable]
GO
CREATE TABLE [dbo].[testtable] (
[testid] [int] NULL ,
[counts] [int] NULL
) ON [PRIMARY]
GO
insert into testtable (testid,counts) values (1,0)
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE Procedure dbo.Test
as
declare @count int
begin tran TEST
select @count=counts from testtable where testid=1
文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/