This is a migrated thread and some comments may be shown as answers.

RunTime -> Name cannot begin with '<'

3 Answers 126 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 27 Dec 2012, 09:47 PM
I have a projec that has recent starting giving the following error when I try and run it:
(note: my other projects work fine)
"C:\Program Files (x86)\Telerik\Test Studio\Bin\ArtOfTest.Runner.exe" list="C:\Automation\Test Studio Projects\AuthAnvil PasswordServer\TestLists\PWS Static Tests.aiilist"
There was an error deserializing the object of type ArtOfTest.WebAii.Design.ProjectModel.Test. Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 1, position 252.
   at ArtOfTest.WebAii.Design.ProjectModel.Project.LoadTest(String filePath)
   at ArtOfTest.WebAii.Design.Execution.CommandLineRunner.ExecuteListInternal(TestList list, String projectPath, Dictionary`2 publishArgs)
   at ArtOfTest.WebAii.Design.Execution.CommandLineRunner.ExecuteTestList(String aiiListPath, Dictionary`2 publishArgs)
   at ArtOfTest.Runner.Program.CommandLineExecution(String[] args)
   at ArtOfTest.Runner.Program.Main(String[] args)

3 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 28 Dec 2012, 04:01 PM
Hello Jon,
the error message states that the '<' character is not allowed in a test name. The obvious first step is to check whether this characters feature in the names of any of the tests within the test list.

Neither Test Studio's GUI nor the Windows OS will allow you to put '<' in a filename so I'm not sure as to how this would happen. If you cannot find any problems yourself go ahead and send us your test project. We'll examine it and we'll try to find and rectify any irregularities.

Regards,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Jon
Top achievements
Rank 1
answered on 28 Dec 2012, 04:34 PM
Hey Stoich, I figured out the problem. first of all apologies for wasting your time. The project where this problem occured is not one that i've worked on it, the author is away on vacation.

It appears that when checked into subversion there were merge issues that were saved into the file. Unfortunately the error that was displayed was not detailed enough to explain which file was causing the error (maybe that would be a good feature request?)

Anyway after searching through the testlists for issues and finding none, I wrote a small program to scan through all of my tstest files and load them into xmldocuments if they failed to list them.

Here's the code that i used to find the problem area:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;
 
namespace XMLChecker
{
    class Program
    {
        static void Main(string[] args)
        {
            int testFails = 0;
            string[] testFiles = Directory.GetFiles(
                @"C:\Your\Project\Directory\Here\",
                "*.tstest",
                SearchOption.AllDirectories
            );
 
            foreach (string test in testFiles)
            {
                if (!readXMLDoc(test))
                {
                    Console.WriteLine(test);
                    testFails++;
                }
            }
            //Wait for user prompt
            Console.WriteLine("\n{0}/{1} failed.", testFails, testFiles.Length);
            Console.WriteLine("Press Any Key...");
            Console.ReadKey(false);
        }
        public static bool readXMLDoc(string filePath)
        {
            try
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(filePath);
            }
            catch (Exception)
            {
                return false;
            }
            return true;
        }
    }
}
0
Konstantin Petkov
Telerik team
answered on 28 Dec 2012, 09:15 PM
Hi Jon,

First thanks for sharing your findings!

The feedback in case like this can be improved. I have submitted a request on your behalf which you can track here. I have also added Telerik points to your account as a token of gratitude to your feedback, thank you!

By the way, can you check the Test Studio application log for exception like this however with message pointing to the test? The exception message there should be more helpful.

Regards,
Konstantin Petkov
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Jon
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Jon
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or