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

Unhandled Exception: System.FormatException: String was not recognized as a vali d TimeSpan. #16

Closed
muralikothandaraman opened this issue Feb 11, 2016 · 3 comments

Comments

@muralikothandaraman
Copy link

Hi,
Thanks for providing nice and rich test report utility.
I have used the used your TRXER utility to generate the HTML report from TRX. It did generate the HTML but the HTML does not contain rich test result data as mentioned. HTML report did not display the result for individual test cases.
And also the utility did not output any error or warning while generating the report. please find below findings on the same for reference.

Output:
image

HTML Report:Attaching snap of report generated for your reference

image

Any help on how to generate the full rich test result data html, would be highly appreciated.

Thanks
Murali

@muralikothandaraman
Copy link
Author

Hi,
There was a mistake from my end, the trx file is generated from mstext.exe and not from vstestconsole.exe. But still I am unable to get full html report and when execute trxer I get the following error.

TrxerConsole.exe unitestresult.trx.trx
Trx File
unitestresult.trx.trx
Loading xslt template...
Loading css...
Loading javascript...
Transforming...

Unhandled Exception: System.FormatException: String was not recognized as a vali
d TimeSpan.
at System.Globalization.TimeSpanParse.TryParseTimeSpan(String input, TimeSpan
StandardStyles style, IFormatProvider formatProvider, TimeSpanResult& result)
at System.Globalization.TimeSpanParse.Parse(String input, IFormatProvider for
matProvider)
at System.TimeSpan.Parse(String s)
at System.Xml.Xsl.CompiledQuery.Script1.ToExactTimeDefinition(String duration
)
at System.Xml.Xsl.CompiledQuery.Query.<xsl:template name="tDetails">(XmlQuery
Runtime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schem
as-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debu
g}position, Double {urn:schemas-microsoft-com:xslt-debug}last, IList1 {urn:sche mas-microsoft-com:xslt-debug}namespaces, IList1 testId, IList`1 testDescription
)
at System.Xml.Xsl.CompiledQuery.Query.<xsl:template name="compiler:generated"

(8)(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 testsFailedCount,
IList1 testsFailedSet, IList1 testRunOutcome)
at System.Xml.Xsl.CompiledQuery.Query.<xsl:template name="compiler:generated"
(3)(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)
at System.Xml.Xsl.CompiledQuery.Query.<xsl:template name="compiler:generated"
(2)(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)
at System.Xml.Xsl.CompiledQuery.Query.<xsl:template match="/">(XmlQueryRuntim
e {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-mic
rosoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debug}posi
tion, Double {urn:schemas-microsoft-com:xslt-debug}last, IList`1 {urn:schemas-mi
crosoft-com:xslt-debug}namespaces)
at System.Xml.Xsl.CompiledQuery.Query.xsl:apply-templates(XmlQueryRuntime {
urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double )

at System.Xml.Xsl.CompiledQuery.Query.Root(XmlQueryRuntime {urn:schemas-micro
soft-com:xslt-debug}runtime)
at System.Xml.Xsl.CompiledQuery.Query.Execute(XmlQueryRuntime {urn:schemas-mi
crosoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver da
taSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver da
taSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(String inputUri, String resu
ltsFile)
at TrxerConsole.Program.Transform(String fileName, XmlDocument xsl)
at TrxerConsole.Program.Main(String[] args)

If anybody has gone through similar issue, please let me know how to resolve this.

Thanks Again
Murali

@muralikothandaraman
Copy link
Author

Please help me in resolving the above mentioned issue.

@muralikothandaraman
Copy link
Author

resolved the issue , submitted the pull request #17

@muralikothandaraman muralikothandaraman changed the title Partial HTML report generation with just total no of test cases passed and failed. Unhandled Exception: System.FormatException: String was not recognized as a vali d TimeSpan. Feb 12, 2016
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

1 participant