Ejemplo n.º 1
0
        //internal void SaveConfig(string ConfigFilePath)
        //{
        //    StreamWriter writer = new StreamWriter(ConfigFilePath);
        //    XmlSerializer serializer = new XmlSerializer(typeof(WebTestSettings));
        //    serializer.Serialize(writer, this);
        //    writer.Close();
        //}

        internal void ReadConfig(string ConfigFilePath)
        {
            StreamReader    reader       = new StreamReader(ConfigFilePath);
            XmlSerializer   serializer   = new XmlSerializer(typeof(WebTestSettings));
            WebTestSettings readSettings = (WebTestSettings)serializer.Deserialize(reader);

            this.SqlConnectionString = readSettings.SqlConnectionString;
            this.WebServerExePath    = readSettings.WebServerExePath;

            reader.Close();
        }
Ejemplo n.º 2
0
        public override void PreWebTest(object sender, PreWebTestEventArgs e)
        {
            //loading the settings files

            WebTestSettings webTestSettings = new WebTestSettings();
            webTestSettings.ReadConfig("WebTestSettings.xml");

            //startig the web server
            WebServerHelper.StartWebServerIfNotStarted(webTestSettings.WebServerExePath);

            //setting up set-up data
            SqlClientScriptRunner.RunScript(webTestSettings.SqlConnectionString, @"..\..\..\..\Eisk.Database\Basic Scripts\Schema\Create-Schema.sql");
            SqlClientScriptRunner.RunScript(webTestSettings.SqlConnectionString, @"..\..\..\..\Eisk.Database\Basic Scripts\Data\Create-Data.sql");

            //message

            //MessageBox.Show("Web Test Starting ...");
        }
Ejemplo n.º 3
0
        public override void PreWebTest(object sender, PreWebTestEventArgs e)
        {
            //loading the settings files

            WebTestSettings webTestSettings = new WebTestSettings();

            webTestSettings.ReadConfig("WebTestSettings.xml");

            //startig the web server
            WebServerHelper.StartWebServerIfNotStarted(webTestSettings.WebServerExePath);


            //setting up set-up data
            SqlClientScriptRunner.RunScript(webTestSettings.SqlConnectionString, @"..\..\..\..\Eisk.Database\Basic Scripts\Schema\Create-Schema.sql");
            SqlClientScriptRunner.RunScript(webTestSettings.SqlConnectionString, @"..\..\..\..\Eisk.Database\Basic Scripts\Data\Create-Data.sql");

            //message

            //MessageBox.Show("Web Test Starting ...");
        }