软件测试习题实现录制登录订票,删除订单,设置插入检查点删除订单是否成功,获取并输出订单的价格,将测试结果采用自定义的方式写入测试报告等

目录

一、前言

二、第一题(资源名称05)

一、题目

二、代码部分

三、第一题(资源名称06)

一、题目

二、代码部分


一、前言

下面提供了题目和代码,需要完整的请到我本人的资源中点击进行下载(名称下面已经标注,在括号里),使用的软件是三角型号标志的,录制和运行使用的一个小飞机,因为这个软件环境复杂,我把它删除了,当时忘记截图了,所以没有放图片跟使用教程。需要使用的可以看一下;

一共是二道题,可以看一下哪一个相同或类似就使用那个;

二、第一题(资源名称05)

一、题目

测试对象:Flight 4a系统
要求:

1.录制登录—订票—删除订单--退出代码。
2..设置检查点删除订单是否成功,将测试结果采用自定义的方式写入测试报告。
3.输出被删除订单中的订单编号和订单价格。

录制后放放大镜第二个输出值选price和ordno,完事再放放大镜第一个检查点,检查删除是否成功

二、代码部分

Option explicit
Dialog("Login").WinEdit("Agent Name:").Set "dddddd" @@ hightlight id_;_2098648_;_script infofile_;_ZIP::ssf1.xml_;_
Dialog("Login").WinEdit("Password:").SetSecure "637c3bc99f80726a2e2f3d9e2228bf8937870fda" @@ hightlight id_;_526452_;_script infofile_;_ZIP::ssf2.xml_;_
Dialog("Login").WinButton("OK").Click @@ hightlight id_;_1574862_;_script infofile_;_ZIP::ssf3.xml_;_
wait 3
Window("Flight Reservation").ActiveX("MaskEdBox").Type "051225" @@ hightlight id_;_460932_;_script infofile_;_ZIP::ssf4.xml_;_
Window("Flight Reservation").WinComboBox("Fly From:").Select "Denver" @@ hightlight id_;_854128_;_script infofile_;_ZIP::ssf5.xml_;_
Window("Flight Reservation").WinComboBox("Fly To:").Select "Frankfurt" @@ hightlight id_;_1771390_;_script infofile_;_ZIP::ssf6.xml_;_
Window("Flight Reservation").WinButton("FLIGHT").Click @@ hightlight id_;_1640398_;_script infofile_;_ZIP::ssf7.xml_;_
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click @@ hightlight id_;_1967958_;_script infofile_;_ZIP::ssf8.xml_;_
Window("Flight Reservation").WinEdit("Name:").Set "zzb" @@ hightlight id_;_591988_;_script infofile_;_ZIP::ssf9.xml_;_
Window("Flight Reservation").WinButton("Insert Order").Click @@ hightlight id_;_1116118_;_script infofile_;_ZIP::ssf10.xml_;_
wait 5
Window("Flight Reservation").WinEdit("Price:").Output CheckPoint("Price:") @@ hightlight id_;_1247172_;_script infofile_;_ZIP::ssf11.xml_;_
Window("Flight Reservation").WinEdit("Order No:").Output CheckPoint("Order No:") @@ hightlight id_;_591806_;_script infofile_;_ZIP::ssf12.xml_;_
'3.输出被删除订单中的订单编号和订单价格。
Dim pr,ord
pr=DataTable(1,1)
ord=DataTable(2,1)
Window("Flight Reservation").WinButton("Delete Order").Click @@ hightlight id_;_1706036_;_script infofile_;_ZIP::ssf13.xml_;_
Window("Flight Reservation").Dialog("Flight Reservations").WinButton("是(Y)").Click @@ hightlight id_;_723086_;_script infofile_;_ZIP::ssf14.xml_;_
Dim res
res=Window("Flight Reservation").ActiveX("Threed Panel Control").Check (CheckPoint("Threed Panel Control")) @@ hightlight id_;_264330_;_script infofile_;_ZIP::ssf15.xml_;_
If res=True Then
	reporter.ReportEvent micPass,"检查订单删除是否成功","删除成功"
	msgbox pr & ord
	Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
Else
    reporter.ReportEvent micFail,"检查订单删除是否成功","删除不成功"
    Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
End If

三、第一题(资源名称06)

一、题目

测试对象:Flight 4a系统
测试业务流程:登录--打开订单---退出
要求:
1.1个用户登录分别打开3张订单(订单编号采用随机数)
2.插入检查点检查订单价格格式是否正确,自定义测试报告
3.获取并输出订单的价格。 

二、代码部分
 

Option explicit
Dialog("Login").WinEdit("Agent Name:").Set "ffffff" @@ hightlight id_;_1050656_;_script infofile_;_ZIP::ssf1.xml_;_
Dialog("Login").WinEdit("Password:").SetSecure "637c3f2c4c17ef59f4cd44d321e16fd3c9c0df8a" @@ hightlight id_;_1050624_;_script infofile_;_ZIP::ssf2.xml_;_
Dialog("Login").WinButton("OK").Click @@ hightlight id_;_4982112_;_script infofile_;_ZIP::ssf3.xml_;_
Dim i
For i = 1 To 3 Step 1
	

Window("Flight Reservation").WinButton("Button").Click @@ hightlight id_;_67844_;_script infofile_;_ZIP::ssf4.xml_;_
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON" @@ hightlight id_;_67868_;_script infofile_;_ZIP::ssf5.xml_;_
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set RandomNumber(5,10) @@ hightlight id_;_67870_;_script infofile_;_ZIP::ssf6.xml_;_
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
Dim res
res=Window("Flight Reservation").WinEdit("Price:").Check (CheckPoint("Price:")) @@ hightlight id_;_67832_;_script infofile_;_ZIP::ssf8.xml_;_
If res=True Then
   reporter.ReportEvent micPass,"检查价格格式是否正确","正确"
Else
   reporter.ReportEvent micPass,"检查价格格式是否正确","不正确"
End If
Window("Flight Reservation").WinEdit("Price:").Output CheckPoint("Price:_2")

Dim dd
dd=DataToble(11)
   msgbox "价格" & dd
 @@ hightlight id_;_67832_;_script infofile_;_ZIP::ssf9.xml_;_
Next
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

姜鸿阳

谢谢您!感谢您的支持!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值