hi rraghvani ,
Thanks for your answer, so I guess I need to create html style then import xml'data into html ?
I try it
$beginning = {
'<html>
<head>
<meta charset="utf-8" />
<title>Apple_Report</title>
<STYLE type="text/css">
h1 {font-family:SegoeUI, sans-serif; font-size:30}
th {font-family:SegoeUI, sans-serif; font-size:20}
td {font-family:Consolas, sans-serif; font-size:16}
</STYLE>
</head>
<h1>Report</h1>
<table border="1">
<tr>
<th>
testname
</th>
<th>
tests
</th>
<th>
failures
</th>
<th>
error
</th>
<th>
time
</th>
<th>
timestamp
</th>
</tr>
'
}
$end = {
'
</table>
</html>
</body>
'
}
$process = {
$name=$_.name
$tests=$_.tests
$failures=$_.failures
$errors=$_.errors
$timestamp=$_.timestamp
'<tr>'
'<td>{0}</td>' -f $name
'<td>{0}</td>' -f $tests
'<td>{0}</td>' -f $failures
'<td>{0}</td>' -f $errors
'<td>{0}</td>' -f $time
'<td>{0}</td>' -f $timestamp
'</tr>'
'<tr>'
'<td>{0}</td>' -f $test_cases
}
$xmldata =[XML](Get-Content E:\AutomationTest\APPLE\sandy_test.xml -Encoding UTF8)
$points=$xmldata.testsuites.testsuite
$points |ForEach-Object -Begin $beginning -Process $process -End $end |Out-File -FilePath E:\AutomationTest\APPLE\sandy_test.html -Encoding utf8
and I can create html file now ,but I don't know how can i do next step step to send email ? could u tell me how you do it ? before I just use python to send email but how can I deal with create html style and run powshell command ? does testcomplete can run it diectly ?