Use Enum as a Parameter type in Keyword Tests
Edit: Added a specific Use Case for clarity Like most users I use parameters for my KWTs. Some parameters have a limited option pool e.g. paramater "WantACookie" can have3 and only3 values "Yes", "No" and "Not Sure" This parameter is used to set the text of a combobox. I could create it as a string that correlates with this and each other KWT or script that calls this KWT just needs to send the string. Say, however the the marketing department decided that "Not Sure" is no longer broadcasting the right message and want to change it to "I'm Thinking About It" All those other scripts and KWTs that used to set it to "Not Sure" will break. Is it possible to create the parameter as a list of key->value pairs. That way my other KWTs and scripts can say the vaule should be WantACookie.NotSure and all I have to do is go to my KWTs WantACookie paramter and change the value of the "NotSure" key to "I'm thinking About It" You would probably have to define this KVP list in the parameter type itself I guess and when setting properties in the visual editor, this "Enum" should be available the same way Variables and Parameters are from a dropdown. Aspecific Use Case: The Enum is a way to define a limited amount of set options that you know won't change Say I'm an e-commerce site. I wan't to make sure users don't have a bad experience by accidentally buying something when they intended to just add it to the wish list. Three tests: 1. Textbox1.Keys()->Textbox2.Keys(),texbox3.Keys,etc,-> buttonPlaceOrder.Click() -> Open Wishlist page -> Are ther items ? No -> Pass -> Open Basket -> Are there items? Yes ->Pass 2. Textbox1.Keys()->Textbox2.Keys(),texbox3.Keys,etc,-> buttonAddWishList.Click() -> Open Wishlist page -> Are ther items ? Yes -> Pass -> Open Basket -> Are there items? No ->Pass 3. Textbox1.Keys()->Textbox2.Keys(),texbox3.Keys,etc,-> buttonCance.Click()l -> Open Wishlist page -> Are ther items ? No -> Pass -> Open Basket -> Are there items? No ->Pass All three tests have the data populate in common. I don't really care what data is in there and I won't use it in a Data Loop so it can all be the same and be written into a single test so I don't have to duplicate all those .Keys() and .Clicks() into all my KWTs So, create one KWT PopulateOrder that does the keypresses. One step further I can see the only thing that distinguishes the process is what button gets clicked. If I specify this as a parameter like PopulateOrder(OrderAction) I can change my tests to this by simply dragging the new KWT into my visualiser : 1. PopulateOrder(Order) -> Open Wishlist page -> Are ther items ? No -> Pass -> Open Basket -> Are there items? Yes ->Pass 2. PopulateOrder(WishList) -> Open Wishlist page -> Are ther items ? Yes -> Pass -> Open Basket -> Are there items? No ->Pass 3. PopulateOrder(Cancel)->Open Wishlist page -> Are ther items ? No -> Pass -> Open Basket -> Are there items? No ->Pass The last steps in my Populate order is an if statement: If(OrderAction equals "Order"){buttonPlaceOrder.Click()} If(OrderAction equals "WishList"){buttonAddWishList.Click()} If(OrderAction equals "Cancel"){buttonCancel.Click()} If I drag the KWT into another KWT I can supply this parameter. Problem is, if a user doesn't know the exact string required and they type in, say "PlaceOrder", the KWT will fail because none of the if statements match. If on the other hand I can define the parameter as an enum that the user can choose from a dropdown I know the logic will always work e.g. if(OrderAction equuals OrderActionEnum.Order) {buttonPlaceOrder.Click()} It's something I would really have appreciated when I started using TC. It would have helped standardise my tests by always having the option based parameters defined, thereby avoiding loads of rework due to early inexperience. It still helps because I wouldn't have to open the PopulateOrder just to double check what string I need to send.4.4KViews2likes8CommentsCreate A Wizard for Parameterizing Data Driven Scripts
When working with Keyword tests, after you've recorded a particular test, you can easily select the steps of the test, right click, and select the option "Make data loop" to auto-magically turn you test into a parameterized data driven loop. Seriously, this is an AMAZING feature for keyword tests. However, for writing scripts, if you want to take a recorded script and turn it into a similar loop, there currently is no automatic method for doing so. It requires, instead, the user to do the work themselves to define the variable, configure the data source, parameterize the script, build the loop, etc. It would be great if TestComplete had a wizard where you can select a recorded script routine and perform the same sort of magic that you can do for keyword tests.3.5KViews2likes4CommentsRun A KeywordTest by name
Runner.CallMethod works pretty well with regards to running Keyword tests. You can do a syntax like: Runner.CallMethod('KeywordTests.TestName.Run', 'parametervalue'); However, this is a bit clunky to me. First of all, if you don't have the name up front but want to parameterize this call, you would need to do a concatenated string for the object name. Secondly, this just seems to be a bit out of the way. Code Completion already knows all the tests associated with the KeywordTests object so the information is already there. It would be nice to do something like KeywordTests.TestByName('MyTest').Run('parametervalue'); This just seems more intuitive and lends itself to a much cleaner implementation for creating a framework around the tests. Note that I'd prefer the keyword test to be returned by name so that we have access to things like Test.Variables and Test.Parameters (see my other ideas on KeywordTests).3.4KViews3likes3CommentsAdd a scripting interface to the Data Generator
I would like to be able to run a script at the beginning of my tests that will update all the column values in a table variable using the data generator. This automation would be an incredibly valuable tool. I have seen a similar post here: https://community.smartbear.com/t5/TestComplete-Feature-Requests/Add-a-scripting-interface-to-the-Data-Generator/idi-p/154423 The answer given does not address the issue at all. What we want to do is build a script that will give us fresh data each time we run a test. If we have to use the data generator wizard interface every time we run a test, then we cannot truly automate testing.1.8KViews1like3CommentsAllow OOP coding with full intellisense in Testcomplete
I understand that Testcomplete is a scripting language and some use the tool for automation script development with "record & playback", however, it would be much appreciated have the option of developing using a oop design patterns. Python and JavaScript are powerful languages. By relegating them to a script code style is stripping away their best features. Those that use JavaScript and Python for automation are using them with selenium which does not have a great way to automate desktop applications. By allowing users to choose to develop oop code with the namemapping features, Testcomplete can work as the preferred IDE for automation.1.1KViews7likes2CommentsLog Folder Items, Set the Icon while inside the stack (or auto detect on some hiearchy)
I thought this should just be a feature already and I posted asking for help to get it to work. https://community.smartbear.com/t5/TestComplete-General-Discussions/Log-Folder-Icon-Checkpoint-Over-Message-Javascript/m-p/200736#M37434 The log folders are real nice for cleaning up the logs but they only change Icon's if the Folder contains an Error or a Warning. I want LogFolders to show a green if it contains a checkpoint. A common sense order of importance Error > Warning > Checkpoint > Message. Instead it's showing Error > Warning > Message. I think it should even auto detect based on the Log item's priority that has been set. Or just a method to hit ie, Log.CurrentStack(iconWarning, priorityHigh); function TestScriptLog() { Log.AppendFolder("This folder Icon should be an Error"); Log.Message("Informational in Folder","",pmNormal); Log.Checkpoint("Checkpoint in Folder","",pmNormal); Log.Warning("Warning in Folder","",pmNormal); Log.Error("Error in Folder","",pmHighest); Log.PopLogFolder(); Log.AppendFolder("This folder Icon should be an Error"); Log.Message("Informational in Folder"); Log.Checkpoint("Checkpoint in Folder"); Log.Warning("Warning in Folder"); Log.Error("Error in Folder"); Log.PopLogFolder(); Log.AppendFolder("This folder Icon should be a Warning"); Log.Message("Informational in Folder","",pmNormal); Log.Checkpoint("Checkpoint in Folder","",pmNormal); Log.Warning("Warning in Folder","",pmHighest); Log.PopLogFolder(); Log.AppendFolder("This folder Icon should be a Warning"); Log.Message("Informational in Folder"); Log.Checkpoint("Checkpoint in Folder"); Log.Warning("Warning in Folder"); Log.PopLogFolder(); Log.AppendFolder("This folder Icon should be a Checkpoint"); Log.Message("Informational in Folder","",pmNormal); Log.Checkpoint("Checkpoint in Folder","",pmHighest); Log.PopLogFolder(); Log.AppendFolder("This folder Icon should be a Checkpoint"); Log.Message("Informational in Folder"); Log.Checkpoint("Checkpoint in Folder"); Log.PopLogFolder(); Log.AppendFolder("This folder Icon should be an Informational"); Log.Message("Informational in Folder","",pmHighest); Log.PopLogFolder(); Log.AppendFolder("This folder Icon should be an Informational"); Log.Message("Informational in Folder"); Log.PopLogFolder(); }Implementation of OnWebPageDownloaded event for Chrome & Edge browser
As partof the Event Handlers, we have lot of events in TestComplete which are easy to implement in Project and helps to reduce manual effort. There is one Event called 'OnWebPageDownloaded' which occurs post the web browser loads a page specified by URL. However, this event is supported to IE browser and MS Web Browser control only. This event is not supported to Chrome & Edge browser as both are mode from Chromium engine. Please implement this event for otherbrowsers like Chrome, Edge & Firefox browser as a future purpose.. That will helps to implement same event across all thebrowsers.952Views4likes3CommentsOption to continue a data-driven test case after one specification of the testcase fails
Currently, the test data-driven test case aborts as soon as an error occurs in one execution, which means that all subsequent test data sets will no longer be executed and the data driven test counts as "completely failed". It would be an improvement if you could specify via an option that the test case continues its execution with the next test data set after an error occurs. At the same time, the log output of a test data-driven test case must be adjusted in such a way that the execution and the result for each test data set (row of a testdata file) are viewed and displayed separately in the log file in order to be able to identify exactly with which test data the test case failed.806Views0likes2CommentsData-driven testing generates explicit test case with test results for each row in testdata file
Using the test data-driven approach, a separate executed test case with test result should be generated for each row in a testdata file. In addition, the name of the test case specification should be able to be defined via an entry in the test data record to separate the single specifications of the generic testcase.698Views0likes2Comments