Declined
Last Updated: 13 Dec 2023 15:06 by ADMIN
ADMIN
Velin Koychev
Created on: 05 Apr 2013 15:30
Type: Feature Request
5
Ability to modify the default template of the code-behind file
Here is the current template which is great for when first starting:

using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
 
using ArtOfTest.Common.UnitTesting;
using ArtOfTest.WebAii.Core;
using ArtOfTest.WebAii.Controls.HtmlControls;
using ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts;
using ArtOfTest.WebAii.Design;
using ArtOfTest.WebAii.Design.Execution;
using ArtOfTest.WebAii.ObjectModel;
using ArtOfTest.WebAii.Silverlight;
using ArtOfTest.WebAii.Silverlight.UI;
using Telerik.TestingFramework.Controls.KendoUI;
using Telerik.WebAii.Controls.Html;
using Telerik.WebAii.Controls.Xaml;
 
namespace BrowsePageTest
{
 
    //
    // You can add custom execution steps by simply
    // adding a void function and decorating it with the [CodedStep]
    // attribute to the test method.
    // Those steps will automatically show up in the test steps on save.
    //
    // The BaseWebAiiTest exposes all key objects that you can use
    // to access the current testcase context. [i.e. ActiveBrowser, Find ..etc]
    //
    // Data driven tests can use the Data[columnIndex] or Data["columnName"]
    // to access data for a specific data iteration.
    //
    // Example:
    //
    // [CodedStep("MyCustom Step Description")]
    // public void MyCustomStep()
    // {
    //      // Custom code goes here
    //      ActiveBrowser.NavigateTo("http://www.google.com");
    //
    //      // Or
    //      ActiveBrowser.NavigateTo(Data["url"]);
    // }
    //
         
 
    public class WebTest1 : BaseWebAiiTest
    {
        #region [ Dynamic Pages Reference ]
 
        private Pages _pages;
 
        /// <summary>
        /// Gets the Pages object that has references
        /// to all the elements, frames or regions
        /// in this project.
        /// </summary>
        public Pages Pages
        {
            get
            {
                if (_pages == null)
                {
                    _pages = new Pages(Manager.Current);
                }
                return _pages;
            }
        }
 
        #endregion
         
        // Add your test methods here...
    }
}

There should be a way to change the template to something like:

using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
 
using ArtOfTest.Common.UnitTesting;
using ArtOfTest.WebAii.Core;
using ArtOfTest.WebAii.Controls.HtmlControls;
using ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts;
using ArtOfTest.WebAii.Design;
using ArtOfTest.WebAii.Design.Execution;
using ArtOfTest.WebAii.ObjectModel;
using ArtOfTest.WebAii.Silverlight;
using ArtOfTest.WebAii.Silverlight.UI;
using Telerik.TestingFramework.Controls.KendoUI;
using Telerik.WebAii.Controls.Html;
using Telerik.WebAii.Controls.Xaml;
 
namespace BrowsePageTest
{
 
    public class WebTest1 : BaseWebAiiTest
  {
  }
}
1 comment
ADMIN
Konstantin Petkov
Posted on: 08 Apr 2013 06:16
As requested by a customer before (source: http://www.telerik.com/support/pits.aspx#/public/test-studio/10353) 
All of our tests require that we implement one of the overrides available in the code behind file. We would like to be able to customize the standard code behind template that Test Studio comes with so that when a new code behind file is added to a test, it already includes the override(s) we need for our tests.