急呀!LR录制sqlite数据库出现问题,请大家帮忙看看
本帖最后由 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”
请高手指点这是什么原因呢,谢谢 要添加System.Data.SQLite类库 回复 2# PrefTest
谢谢回复,那怎么添加呢?
录制之前就写好?再引用吗? 在Recording Options里的Filters(筛选器)里。选择Custom Filter-->Fliter Manager-->New,自己取个筛选器的名称,然后Add Reference-->Browse 以上System.Data.SQLite类库。
可以根据LR帮助中的“Working with the Filter Manager”进行配置。
页:
[1]