I need to evaluate the telerik test studio for possible use with wpf applications.
I now have a problem with the produce of code behind each step.
I do the following steps in the VS-plugin Version:
1) Add code behind file to your test
2) then I get the namespace with a class...(for example: versuchen.tstest.cs)
3) then I make the step: "Customize Step in Code"
4) I get the method in the class (for example: versuchen.tstest.cs) and therefore I have the following result :
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 ArtOfTest.WebAii.Wpf; using Telerik.WebAii.Controls.Html; using Telerik.WebAii.Controls.Xaml; namespace CodeStep { // // 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 // Applications.Spreadsheetexe.Book1__Spreadsheet.InsertTabitem.User.Click(); // } // public class versuchen : BaseWebAiiTest { #region [ Dynamic Applications Reference ] private Applications _applications; /// <summary> /// Gets the Applications object that has references /// to all the elements, windows or regions /// in this project. /// </summary> public Applications Applications { get { if (_applications == null) { _applications = new Applications(Manager.Current); } return _applications; } } #endregion [CodedStep(@"Type 'test' into PasswordTextBoxPasswordbox")] public void versuchen_CodedStep() { // Type 'test' into PasswordTextBoxPasswordbox Applications.WpfClientexe..PasswordTextBoxPasswordbox.SetPassword(true, "test", 10, 100); } // Add your test methods here... } } 6) and when i execute the steps or the code, i get the following error:
'05.09.2011 17:32:46' - Starting execution....'05.09.2011 17:33:00' - Detected custom code in test. Locating test assembly: CodeStep.dll.'05.09.2011 17:33:00' - Failure detected during execution. Details:
------------------------------------------------------------
'05.09.2011 17:33:00' - System.IO.FileNotFoundException: Unable to find the code behind assembly. Please make sure you have compiled your code behind without errors before attempting to execute the test. Looking for: c:\users\al-jendi\documents\visual studio 2010\Projects\CodeStep\CodeStep\bin\Debug\CodeStep.dllIf you are running VS 2010, make sure Deployment is checked in your .settings file (in the solution items) at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureAssemblyExists(String assembly, String folder) at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult) at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, String binariesFolder, ExecutionType exeType, Guid firstStepGuid, Guid lastStepGuid, IntPtr existingBrowserHandle, DebuggerOptions debuggerOptions)
------------------------------------------------------------
'05.09.2011 17:33:01' - Test completed!
Thanks Telerik Team