Hi,
Problem: Viewing the results of selenium test suite execution using the "post" fired through Selenium
I am trying to view the results of my selenium tests which I have integrated with CI (Cruise Control). Here are the steps I am following.
1) Using Cruise Control, I fire the URL....http://SeleniumServer/TestRunner.html?auto=true
2) I have modified the Selenium code files to redirect the results to /Results.asp
Here is the code for Results.asp
<HTML>
<Head>
</Head>
<body>
Selenium test results
</BR>
</BR>
<% Response.write " Test Status is " + Request("result") %>
</BR>
<% Response.write " Total time is " + Request("totalTime") %>
</BR>
<% Response.write " Passed Test Cases " + Request("numTestPasses") %>
</BR>
<% Response.write " Failed Test Cases " + Request("numTestFailures") %>
</BR>
<% Response.write " noOfRows " + Request("noOfRows") %>
</BR>
<%
' Section for creating output HTML
Dim objFile, fileName, fileLocation
fileLocation = Server.mapPath( day(date()) & month(date()) & year(date()) & "SeleniumResults.html")
set objFile = Server.CreateObject("Scripting.FileSystemObject")
set fileName = objFile.CreateTextFile(fileLocation, true)
fileName.WriteLine(server.htmlencode(Request("suite")))
fileName.close
%>
The intention was to view the output result suite as an HTML file. However the HTML file being generated contains several non HTML characters that do net get removed by doing a server.htmlencode(). They prevent the HTML from being rendered and hence I cannot view the result file.
Here are the contents of the html file being generated.
%3CTABLE%20cellSpacing%3D1%20cellPadding%3D1%20border%3D1%3E%0D%0A%3CTBODY%3E%0D%0A%3CTR%3E%0D%0A%3CTD%20bgColor%3D%23ffcfcf%3E%3CB%3ETest%20Suite%3C/B%3E%3C/TD%3E%3C/TR%3E%0D%0A%3CTR%3E%0D%0A%3CTD%20bgColor%3D%23ffcfcf%3E%3CA%20href%3D%22./TestOpen.html%22%3ETestOpen%3C/A%3E%3C/TD%3E%0D%0A%3CTD%20style%3D%22DISPLAY%3A%20none%22%3E%26lt%3BTABLE%20cellSpacing%3D1%20cellPadding%3D1%20border%3D1%26gt%3B%0D%0A%26lt%3BTBODY%26gt%3B%26lt%3BTR%20bgColor%3D%23ffcfcf%26gt%3B%0D%0A%26lt%3BTD%20colSpan%3D3%26gt%3BTest%20Open%26lt%3BBR%26gt%3B%26lt%3B/TD%26gt%3B%26lt%3B/TR%26gt%3B%0D%0A%26lt%
Is there a way to strip of these non-HTML characters from the results? Alternatively, is there a way to write these results to a file and view them at a later point in time? Since Selenium is fired through continuous integration, it is not always possible to have someone view and save the results of every execution.
_______________________________________________
Selenium-users mailing list
[email protected]
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users