Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with TRX file generated from VSTestConsole #12

Open
Praveenpvs opened this issue Nov 9, 2015 · 3 comments
Open

Not working with TRX file generated from VSTestConsole #12

Praveenpvs opened this issue Nov 9, 2015 · 3 comments

Comments

@Praveenpvs
Copy link

Hi,
Not sure if this tool supports transforming TRX file, generated from VSTestConsole, but this is not working for me.

Environment: VS 2015, output generated from running regular C# unit tests.
Test Console: VSTest.Console.

Exception while transforming:
Length can not be less than zero.

Stack strace as below:
Unhandled Exception: System.ArgumentOutOfRangeException: Length cannot be less t
han zero.
Parameter name: length
at System.String.Substring(Int32 startIndex, Int32 length)
at System.Xml.Xsl.CompiledQuery.Script1.RemoveAssemblyName(String asm) in c:
Users\praveen.polepalli\AppData\Local\Temp\2wyfjtpf.0.cs:line 29
at System.Xml.Xsl.CompiledQuery.Query.<xsl:template name="compiler:generated"

(6)(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNaviga
tor {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft
-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, ILi
st1 {urn:schemas-microsoft-com:xslt-debug}namespaces, IList1 testRunOutcome, I
List1 testsFailedSet, IList1 testsFailedCount, IList1 classSet, IList1 class
Count)
at System.Xml.Xsl.CompiledQuery.Query.<xsl:template name="compiler:generated"
(4)(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNaviga
tor {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft
-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, ILi
st1 {urn:schemas-microsoft-com:xslt-debug}namespaces, IList1 classCount, IList
1 classSet, IList1 testsFailedCount, IList1 testsFailedSet, IList1 testRunOu
tcome)

@jhonny-villarroel
Copy link

I have the same problem, also I am using VS 2015

@PMudra
Copy link

PMudra commented Dec 15, 2015

I had the same problem. This pull request fixed the error for me: #6

@sthirion
Copy link

In the Trxer.xslt, change the method RemoveAssemblyName (on line 13) to:
public string RemoveAssemblyName(string asm)
{
if(asm.IndexOf(',')>0) {
return asm.Substring(0,asm.IndexOf(','));
} else {return asm;}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants