Exporting variable to CVS file to use in a later test
Hi All. I am generating a variable in Test1, that I would like to write/output to a CSV file (or even Excel would work) for use in Test2. Does anyone know of an easy way to do this? Or can provide some information on where to look on how to write to specific fields in a CSV/Excel file? Thanks.Solved1.2KViews0likes3CommentsNew Excel Object in 14.5 - please add additional features to new Excel object similar to COM object
New Excel Object in 14.5 - please add additional features like '.RefreshAll', '.Application.Calculate', '.Application.CalculateFullRebuild' just like the Excel.application COM Object features. Though the new Excel object provides options to update the specified cell values, the other dependent cells that are having references to the parent cell are not getting updated automatically. For ex: Sheet1.Cell(A1) value is <Login URL> We are referencing this Sheet1.Cell value in other sheets having test cases as parameters like as follows: Sheet2.Cell(A1) having formula "=CONCATENATE(Sheet1!$A$1,"/page1")" Sheet3.Cell(A1) having formula "=CONCATENATE(Sheet1!$A$1,"/page2")" Currently we are using the'.RefreshAll', '.Application.Calculate', '.Application.CalculateFullRebuild' features of Excel.application Com object feature to refresh/update the excel files for this requirement. All the referenced cells are automatically updated. If this features are available in new Excel object then we can completely do away with Excel installation in Test Execution machines.1KViews6likes0CommentsExcel application does not launch properly using Tested Apps
Hi, We have requirement of testing an Excel Add-in. To test it we open Excel, Load the add-in, generate formulas and extract data using the add-in and compare the outcome with expected values. We launch excel using TestedApps object and then control excel using COM objects. We are facing an issue while launching excel in which sometimes the Excel gets stuck on the initial pop-up while launching and doesn't proceed. The TestComplete also doesn't respond to this and keeps waiting for the excel to launch. Sometimes it waited for more than 2 days before it was manually terminated. Has anyoe else faced this issue or know how to fix it kindly post it here. Thanks, YusufSolved1.1KViews0likes1CommentHow to resolve the error while opening an excel workbook?
I am trying to open an excel workbook using the below lines of code. It throws an error saying, function Test(){ var Excel; Excel = Sys.OleObject("Excel.Application"); Excel.Visible = true; Excel.Workbooks.Open("D:\\test1.xls"); } "Sorry, we couldn't find D:\test1.xls. Is it possible it was moved, renamed or deleted?" I don't know what's wrong with this simple lines of code. I am using TestComplete 12 and have MS Excel 2016 64 bit installed. Is it causing the problem? Please help!906Views0likes1CommentRead and Write in Excel sheets using VBScripts
I am creating a framework using Excel Sheets for a Desktop application. I am new to TestComplete. I have seen the syntax from Help in Testcomplete. But still I am not able to bring up a solution. For example I have 5 testcases to be executed. I have created an excel with 2 sheets namely Sheet1 and Sheet2 with 4 testcases with headings in Sheet1 as TestCases and Status. In sheet2, i have createdTestcase ID,TestCase,Expected Result,Actual Result,Status,Screenshots,Start Time,End Time,Time Taken. In sheet1, if the status column value is 1 then the Testcase will be executed. If it is 0 then it will not be executed. In sheet2, the actual result should be PASS or FAIL. PASS should be in green color and FAIL should be in RED color. And if both the actual and expected are same then PASS should be mentioned in Status column. And how to add screenshot path for the respective Testcase? Also, I would like to know how to fetch the start time and end time and compare both of them and calculate the total time taken. I need a sample code to fetch details from the excel sheet and to write the same results in that excel sheet. I know it is difficult for me at this stage, but I need your help guys. Awaiting for the answers soon. I have attached the excel sheet for reference.1KViews0likes1CommentTest result status not refreshing
I have this function which I have picked up from a few examples online and managed to get it to write to excel with the result of the test that run. However it seems that either it doesn't refresh after every run or it gets the previous result log. I have created a test to test this function which writes log messages and putting the result in the 3 possible outcomes and everything I run it it puts the precious result to excel... Could someone point me in the right direction as I believe I'm using this method incorrectly. function WriteDataToExcel(fname, sheetName,testTime, errorCount, warnCount) { var app = Sys.OleObject("Excel.Application"); var book = app.Workbooks.Open(fname); var sheet = book.Sheets.Item(sheetName); var rowCount = sheet.UsedRange.Rows.Count+1; var columnCount = sheet.UsedRange.Columns.Count; var Logs; var Count; var Name; var Status = null; // Obtains the object that holds the list of project logs Logs = Project.Logs; Count = Logs.LogItemsCount // Iterates through the list of project logs for (var i = 0; i < Count; i++) { var LogItem = LogsCol.LogItem(i); Name = Logs.LogItem(i).Name; Status = Logs.LogItem.Status; } var TestResult = Status; switch (Status) { case 0: TestResult = "Passed" break; case 1: TestResult = "Warnings" break; case 2: TestResult = "Failed" break; default : TestResult = "Error" break; } app.Cells(rowCount,columnCount-5) = (aqConvert.DateTimeToFormatStr(aqDateTime.Now(), "%d/%m/%y %H:%M")); app.Cells(rowCount,columnCount-4) = Name; app.Cells(rowCount,columnCount-3) = TestResult; app.Cells(rowCount, columnCount-2) = testTime; app.Cells(rowCount, columnCount-1) = errorCount; app.Cells(rowCount, columnCount-0) = warnCount; book.Save(); app.Quit(); }Solved3.8KViews0likes18CommentsAlternatives to fixing issue with excel file not getting unlocked
Currently, after test runs I write to excel file for capturing test metrics. It seems that at times Microsoft does not unlock the excel spreadsheet and the test hangs until I manually kill the excel process. Are there any suggestions on how to fix this issue. This prevents us from running our tests overnight all the way through. The only alternative I can come up with is to write it to a text file as a .csv file. P.S. I am writing to excel as an ActiveXObject Looking for other alternatives. Thanks, JeffSolved1.4KViews0likes2CommentsTestComplete 11.0 - Memory Issue
Environment Details: Windows 7, 64 Bit, 8 GB RAM TestComplete 11.0 Project Details: Used NameMapping Approach Defined All object references in one script file as Global Variables. There are 3000+ Variables. Reading and Writing Data from Excels Problem: When i open my project. RAM usage is 320-340 MB When i run any of my test function RAM usage will increase to 450-500 MB If i keep on running test functions RAM usage will increase to 800+ MB This is making my test execution go slow and crashing application under test. Anybody faced this kind of issue ? Why RAM usage will be increasing every time ? Is there any memory leakage ? Why after execution RAM usage is not coming to normal ?5.4KViews1like18CommentsTestComplete returns NULL from Excel in Property Checkpoint, but returns Correct value in Jscript
I am using the PropertyCheckpoint to verifya value from UI with a value from an Excel. Thecheckpoint returns a NULL value from the Excel, but when i use a script to do the same, i get the correct value. Pleaselet me knowwhat the issue is. P.S: This is just one of themany "irregularities" i have found in TestComplete. Willbring them upwhen i get time.Solved4.6KViews0likes9Comments