51Testing软件测试论坛

标题: LR录制脚本后出错,求救~~~ [打印本页]

作者: nidongmei    时间: 2010-10-13 11:32
标题: LR录制脚本后出错,求救~~~
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]
作者: nidongmei    时间: 2010-10-13 11:33
刚刚没表达清楚,是录制好后回放报错。
作者: bobsun    时间: 2010-10-13 13:35
把脚本贴出来
作者: nidongmei    时间: 2010-10-13 16:08
//---------------------------------------------
//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();
作者: canhuih    时间: 2011-1-11 16:42
录制就没成功呢




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2