Contributions
Re: Creating own result file, passing test result into .txt file
I found a solution using the following function. function OwnResult_OnStopTest(Sender) { var kwName = Project.TestItems.Current.Name; var sPath = "c:\\IDC\\QAResult\\AutomatedTestsResult.txt"; if (Log.ErrCount > 0) strTestResult = "FAILED"; else if (Log.WrnCount > 0 && Log.ErrCount == 0) strTestResult = strTestResult != "FAILED" ? "WARNING" : "FAILED"; else strTestResult = strTestResult != "FAILED" ? (strTestResult != "WARNING" ? "PASSED" : "WARNING") : "FAILED"; Log.Message(strTestResult + "... \t" + kwName); if (!aqFile.Exists(sPath)) aqFile.Create(sPath); aqFile.WriteToTextFile(sPath, strTestResult + "... \t " + kwName + "\r\n", aqFile.ctANSI, false); }1.2KViews0likes0CommentsCreating own result file, passing test result into .txt file
Hello, my goal is to create simple result file, which can be after test execution displayed in command prompt. I have a test run which consists from many test items, and all I want to see on the first place is just the test item name and test item result. I know how to get the test item name and result (I use a General event OnStopTest for getting the name and restult). But I couldn't find any way how to save these information into one file (the best would be .txt so the command prompt could show the file content). Is there someone who could help me with this? Thank you Mia.Solved1.2KViews0likes2Comments- 899Views0likes0Comments
How to keep variable value in all keyword tests
Hello, I have this keyword test set. In the first test, two IDs are generated, and I need to work with them in the following tests. But in each keyword test I have to define new variable and set its new value. Unfortunately, I have no way how to get those IDs except in the first test - so I cannot set the right variable value because I have no longer access to the object which returns the IDs. Any idea how to do this? Thanks!Solved1.1KViews0likes2CommentsRe: Send test result via e-mail in subject
Hi Marin, yes, I did it the same way, when I found out that it works like that. I just wasn't sure that it could work, because when it's part of a tests it seems that the result is created after this routine is finished. But apparently, the result is created continuously. So thank you very much again :) Miriam3.3KViews0likes0CommentsRe: Send test result via e-mail in subject
Oh, you were right, the parser wasn't installed at all. So now it works fine, it sends emails witht the pretty table and so on. I have just last question, I hope. It sends the email after each tests. I have a project suite which includes about 8 test items and the count will grow. Is there any chance how to invoke this action only when whole test project ends?3.3KViews0likes0CommentsRe: Send test result via e-mail in subject
Hi Marin, this is exactly what I want. It looks really good and it would be really really great if it worked on my project. Unfortunately I was not able to apply this on my test project. It is the GetTestSummary() function which keeps on failing. First because of the: var xDoc = Sys.OleObject("MSXML2.DOMDocument.4.0"); ... for error: Invalid class string: cannot obtain ClassID. I googled a little and tried to change the version in the argument to 6.0. Then it started to fail on another row: var wrnC = VarToInteger(xDoc.selectSingleNode('Nodes/Node[@name="root"]/Prp[@name="warning count"]/@value').text); ... with message: Object required. Until that row it seems that everything is working, the Description.tcLog is generated. So now I really don't know what's wrong because I have no experience with parsing text. Thanks for your help Miriam3.3KViews0likes0Comments