|
本帖最后由 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”
请高手指点这是什么原因呢,谢谢 |
|