51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1750|回复: 4
打印 上一主题 下一主题

[原创] LR录制脚本后出错,求救~~~

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-10-13 11:32:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
c/s结构,.NET协议。录制脚本后报错,请教~~~!在线等,求教各位大侠,多谢多谢

下面是详细:
Error: Failed to compile virtual user.
Notify: __________________________________________________
Notify: Project "C:\Documents and Settings\nidongmei\Local Settings\Temp\noname14\Script.sln" (Build target(s)):
Notify:
Notify: __________________________________________________
Notify: Project "C:\Documents and Settings\nidongmei\Local Settings\Temp\noname14\Script.sln" is building "C:\Documents and Settings\nidongmei\Local Settings\Temp\noname14\Script.csproj" (default targets):
Notify:
Notify: vuser_init.cs(23,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(31,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(39,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(47,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(58,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(63,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(78,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(86,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(97,12): warning CS1030: #warning: ':  Code Generation Error'
Notify: vuser_init.cs(102,12): warning CS1030: #warning: ':  Code Generation Error'
Error: vuser_init.cs(29,4): error CS0103: The name 'SQLiteDataReader_1' does not exist in the current context
Error: vuser_init.cs(37,4): error CS0103: The name 'SQLiteDataReader_2' does not exist in the current context
Error: vuser_init.cs(45,4): error CS0103: The name 'SQLiteDataReader_3' does not exist in the current context
Error: vuser_init.cs(53,4): error CS0103: The name 'SQLiteDataReader_4' does not exist in the current context
Error: vuser_init.cs(69,4): error CS0103: The name 'SQLiteDataAdapter_1' does not exist in the current context
Error: vuser_init.cs(69,40): error CS0103: The name 'value_1' does not exist in the current context
Error: vuser_init.cs(74,18): error CS0103: The name 'SQLiteDataAdapter_1' does not exist in the current context
Error: vuser_init.cs(84,4): error CS0103: The name 'SQLiteDataReader_5' does not exist in the current context
Error: vuser_init.cs(92,4): error CS0103: The name 'SQLiteDataReader_6' does not exist in the current context
Error: vuser_init.cs(108,4): error CS0103: The name 'SQLiteDataAdapter_2' does not exist in the current context
Error: vuser_init.cs(108,40): error CS0103: The name 'value_2' does not exist in the current context
Error: vuser_init.cs(113,18): error CS0103: The name 'SQLiteDataAdapter_2' does not exist in the current context
Notify: Done building project "Script.csproj" -- FAILED.
Warning: Extension DotnetExtensionReplay.dll reports error -1 on call to function ExtPerProcessInitialize        [MsgId: MWAR-10485]
Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread.        [MsgId: MERR-10176]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2010-10-13 11:33:01 | 只看该作者
刚刚没表达清楚,是录制好后回放报错。
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2010-10-13 13:35:03 | 只看该作者
把脚本贴出来
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2010-10-13 16:08:24 | 只看该作者
//---------------------------------------------
//Script Title        :
//Script Description  :
//
//
//Recorder Version    : 593
//---------------------------------------------

namespace Script {
    using LoadRunner;
    using Mercury.LoadRunner.DotNetProtocol.Replay;
    using System;
    using System.Data;
    using System.Data.SQLite;
   
   
    public partial class VuserClass {
        
        public virtual int vuser_init() {

                        lr.think_time(10);

                        #warning:  Code Generation Error
                        // Found an undefined object of type System.Data.SQLite.SQLiteDataReader. Assigning it the name SQLiteDataReader_1.
                        // Suggested solution: adding both this type, in assembly System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, to the filter
                        // and/or any other types that return instances of this one.
                        // Note:  This script will not compile as is.
                        lr.log("Event 1: SQLiteDataReader_1.Dispose();");
                        SQLiteDataReader_1.Dispose();

                        #warning:  Code Generation Error
                        // Found an undefined object of type System.Data.SQLite.SQLiteDataReader. Assigning it the name SQLiteDataReader_2.
                        // Suggested solution: adding both this type, in assembly System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, to the filter
                        // and/or any other types that return instances of this one.
                        // Note:  This script will not compile as is.
                        lr.log("Event 2: SQLiteDataReader_2.Dispose();");
                        SQLiteDataReader_2.Dispose();

                        #warning:  Code Generation Error
                        // Found an undefined object of type System.Data.SQLite.SQLiteDataReader. Assigning it the name SQLiteDataReader_3.
                        // Suggested solution: adding both this type, in assembly System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, to the filter
                        // and/or any other types that return instances of this one.
                        // Note:  This script will not compile as is.
                        lr.log("Event 3: SQLiteDataReader_3.Dispose();");
                        SQLiteDataReader_3.Dispose();

                        #warning:  Code Generation Error
                        // Found an undefined object of type System.Data.SQLite.SQLiteDataReader. Assigning it the name SQLiteDataReader_4.
                        // Suggested solution: adding both this type, in assembly System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, to the filter
                        // and/or any other types that return instances of this one.
                        // Note:  This script will not compile as is.
                        lr.log("Event 4: SQLiteDataReader_4.Dispose();");
                        SQLiteDataReader_4.Dispose();
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2011-1-11 16:42:49 | 只看该作者
录制就没成功呢
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-28 02:35 , Processed in 0.089898 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表