Contributions
- 5.9KViews0likes0Comments
Re: Skipping Test Item when the first error occurs
Sergiu, you are correct that if you turn off Stop on Error in the playback, without subsequently setting Stop on Error for the individual Test Item, that TestComplete will continue after an initial error occurs. The confusing thing here is that there are TWO places to specify Stop on Error. The first place, you know about; in the playback settings for your project. If that setting is checked, then the individual test item settings for stop on error are ignored. There is, however, a second place where you can specify that the test should stop on error and that is on the Test Item page. On the test item page, there are two columns, one for Stop On Error, and one for Stop on Exception. These two columns are (stupidly in my opinion) hidden by default, which is why I said you need to use the Field Chooser to expose them. Once you can see them, you can set each individual Test Item to stop its own execution, or stop execution of the entire project. Here is a picture of the setting I am talking about.5.9KViews0likes0CommentsRe: Is it practical to share a project between testers without Source Control
Same extensions active. What happened in my case was that I had turned of a slew of them because I didn't use them to speed up performance and another developer hadn't resulting in a difference in the MDS file every time we checked into source control.1.2KViews0likes0CommentsRe: How to Write TestComplete Test Results to SQL Server
Essentially what I've done is set up event handlers for OnStopTest and OnStartTest. I'll post examples of what those are below. We have a database for software testing that contains a TestStatus table that has information about the project and test item, the time it started and stopped, a status (error, warning, running, ok, etc), the last error that occurred, and a pointer to a log file of the run. OnStartTest I insert a placeholder row into the TestStatus table (via a stored procedure) and then I update the same row in the OnStopTest event. We wrote a view that brings up the latest results for all our tests. You can dump the results of that view into anything, a web page, an email, etc. and see a snapshot of the latest test results. Here are the OnStartTest and OnStopTest events. stDB is an instance of a database helper object I wrote that allows you to execute sql or stored procedures against a SQL Server database. function GeneralEvents_OnStartTest(Sender) { //leave if we're not running in a test item if (NotRunningInTestItem()) return; errors = []; //clear the errors array warnings = []; //clear the warnings array currentErrorCount = Log.ErrCount; if (Project.TestItems.Current.Name == GetFirstEnabledTestItemName()) { //first test item in the run--do things that need to be done to prepare the test OnBeginTesting(); } //Log the start to the database var aParamArray = new Array(); aParamArray.push(["TestSectionName", GetProjectName() + "_" + Project.TestItems.Current.Name]); aParamArray.push(["TestStatusDesc", "Running"]); stDB.ExecuteStoredProc("InsertTestSectionStatus",aParamArray); //Set the indicator and create a folder Indicator.Clear(); Indicator.PushText(Project.TestItems.Current.Name); // Log.PushLogFolder(Log.CreateFolder(Project.TestItems.Current.Name)); } function GeneralEvents_OnStopTest(Sender) { //This is here to avoid logging/deleting backup files etc, if we're running something //outside a test item (ie. rightclick|Run Current Routine) if (NotRunningInTestItem()) return; //Save the log file for the current test item var linkToLog = SaveLog(); //Save the results to the SoftwareTesting database var aParamArray = new Array(); aParamArray.push(["TestSectionName", GetProjectName() + "_" + Project.TestItems.Current.Name]); aParamArray.push(["TestStatusDesc", GetTestStatus()]); aParamArray.push(["TestStatusComments", GetTestStatusComment()]); aParamArray.push(["TestLogPath", linkToLog]); stDB.ExecuteStoredProc("CompleteTestSectionStatus",aParamArray); //If this was the last test, perform end of test tasks if (Project.TestItems.Current.Name == GetLastEnabledTestItemName()) { OnEndTesting(); } Indicator.PopText(); }1.8KViews0likes1CommentRe: Skipping Test Item when the first error occurs
That is a setting in TestComplete. Go to the test items page for TestComplete. If you do not see the columns, stop on error, and stop on exception, right click somewhere and select field chooser to add them. Select the behavior you want, in this case, Test Item, for each of the test items you want to stop on test item. You probably also want to go to the playback properties and uncheck stop on error there.5.9KViews0likes0CommentsRe: How to Write TestComplete Test Results to SQL Server
I don't know of any specific integration, but you can definitely roll your own. We wrote code that saves the log to a specified directory, and then logs the results to a SQL Server database table that has the test name, results, and a pointer to the log.1.8KViews0likes0CommentsRe: Is there a way to paste text that was copy using 'select all' into a variable?
There are lots of ways you can do this, but it's hard to discern exactly which one you might want. Can you give a little background about what you are trying to do? Do you have one application open that you've copied from and another you want to paste into? Could it be as simple as you need to set focus to the element you're pasting into and emulate a Ctrl-V?1.4KViews0likes0Comments