51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2213|回复: 3
打印 上一主题 下一主题

[原创] 急呀!LR录制sqlite数据库出现问题,请大家帮忙看看

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-12-27 17:16:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 canhuih 于 2010-12-27 18:39 编辑

开发语言Csharp,数据库sqlite,基于.net开发

使用的是LR9.0,录制协议选择Microsft.NET
但是录制完成,脚本很多警告,部分脚本如下:
namespace Script {
    using LoadRunner;
    using Mercury.LoadRunner.DotNetProtocol.Replay;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SQLite;
    using System.Globalization;
   
   
    public partial class VuserClass {
        
        public virtual int Action() {

                        #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.66.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.66.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();

编译通不过,部分log如下:
Notify: Action.cs(3326,12): warning CS1030: #warning:“:  Code Generation Error”
Error: Action.cs(29,4): error CS0103: 当前上下文中不存在名称“SQLiteDataReader_1”
Error: Action.cs(37,4): error CS0103: 当前上下文中不存在名称“SQLiteDataReader_2”
Error: Action.cs(45,4): error CS0103: 当前上下文中不存在名称“SQLiteDataReader_3”
Error: Action.cs(53,4): error CS0103: 当前上下文中不存在名称“SQLiteDataReader_4”
Error: Action.cs(66,30): error CS0103: 当前上下文中不存在名称“SQLiteCommand_1”
Error: Action.cs(66,61): error CS0103: 当前上下文中不存在名称“value_1”


请高手指点这是什么原因呢,谢谢
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2010-12-27 21:33:00 | 只看该作者
要添加System.Data.SQLite类库
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2010-12-28 08:44:42 | 只看该作者
回复 2# PrefTest


    谢谢回复,那怎么添加呢?

录制之前就写好?再引用吗?
回复 支持 反对

使用道具 举报

  • TA的每日心情
    无聊
    2015-6-14 21:08
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    4#
    发表于 2011-6-13 11:45:41 | 只看该作者
    在Recording Options里的Filters(筛选器)里。选择Custom Filter-->Fliter Manager-->New,自己取个筛选器的名称,然后Add Reference-->Browse 以上System.Data.SQLite类库。
    可以根据LR帮助中的“Working with the Filter Manager”进行配置。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-9-21 05:29 , Processed in 0.070890 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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