When change a name in NameMapping, Then the object name in script tests would also update
Let's say you don't like the name you gave an object in the NameMapper. When you change the name of that object, the name will also be updated in any and all Keyword tests which this object was used in. However, the name will Not be updated when used in script tests. It would be nice if the name would be updated in Scripts. Sometimes we think of better naming conventions and want to rename some objects.1.3KViews21likes5CommentsGithub Copilot Integration
GitHub Copilot suggests code completions as developers type and turns natural language prompts into coding suggestions based on the project's context and style conventions. One new idea would be having a copilot plugin for testcomplete would increase productivity and coding efficiency URL for reference - https://github.com/features/copilotPossible bug with using regexp for manual object name mapping
I have some desktop application under test where MDI windows have highly variable WndCaption property. This produces an awful lot of name mappings when I record keyword tests. Auto-generated mappings use two parameter-value pairs: "WndClass: Afx:00400000:b*" and "WndCaption: <whatever_caption>". However the captions have some distinctive patterns and naturally I wanted to utilize those patterns to reduce number of mappings. So I created the manual object mappings like this: wndType1: WndClass == "Afx:00400000:b*" WndCaption == "regexp:^Object: .*" wndType2: WndClass == "Afx:00400000:b*" WndCaption == "regexp:^!(Object:).* - \(.*\)$" ... and so on, paying special attention to possible ambiguities when constructing the regular expressions. Mapping worked as expected, showing correct MappedName in the Object Browser. Upon converting the existing keyword tests to use the new mapping, everything functioned seamlessly. However, when I attempted to record new keyword tests, TestComplete consistently generated its own mappings instead of utilizing the existing ones, despite my efforts. After some trial and error, I resorted to replacing the regular expressions with the combination of conditions and wildcards: wndType1: WndClass =="Afx:00400000:b*" WndCaption =="Object: *" wndType2: WndClass =="Afx:00400000:b*" WndCaption == "* - (*)" ANDWndCaption !="Object: *" And all of a sudden everything works like a charm! I believe this behavior is not intended, especially since I couldn't find any mention of limitations related to the use of regular expressions in the documentation available.89Views0likes0Commentsplease add method to get CurrentModule name (not just CurrentTestCase name)
Hi, This is a followup to this post: https://community.smartbear.com/t5/TestComplete-Questions/Getting-Name-of-Failed-test-in-OnLogError-Event/td-p/244058 At the moment, we have a property aqTestCase.CurrentTestCase.Name, which returns the name of current Test Case. However, this property returns null/exception in case the module in not set as a 'Test Case' in the Execution Plan. The thing is, that not all modules are usually set as Test Case, therefore aqTestCase.CurrentTestCase.Name is useless for these modules. So it would be nice to have either a new property or extended existing CurrentTestCase.Name property, which will return the name of module, regardless it's set as TestCase or not. Thanks.702Views6likes2CommentsLog 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(); }Execution Plan: add Count (cycle) ability to Group/Subgroup
Hi, I think it would be really helpful, if Group/Subgroup folders would have an ability to repeat their content by a defined number of times. Basically, the same as existing Cycle option for Test modules. I have a scenario, where I need to perform the same steps "n" times, just with different input data. The only solution now, is to create the basic structure of steps inside a Group folder and then copy and paste the Group folder "n" times. I consider this approach pretty ineffective. Check this screenshot... If there would be a Count option at the Group level, it would allow me to perform the required steps with just single CreateAsset group, instead of 4 of them. True, group folders currently does not support the data driven approach as well. But I believe I could easily fix that by a simple script, which would get the required data from CSV or similar file and fill them for each Group iteration run (based of actual iteration number, using Project TestItemObj.Iteration). What do you guys think?253Views0likes1CommentSetting default attribute to map by with XPath Mapping
TL;DR: I want to be able to set some setting somewhere that tells TestComplete toonlyuse the "data-testid" (or any other) attribute to map objects. What is a data-testid? We have thedata-testidtag on every (important) element on our webpage. This testid is used to uniquely identify an object, meaning no other object on the webpage has this testid. For example like this: <fro-input-wrapper data-testid="CONFIG.COMMON.systemName"> <mat-form-field> <wrapper> <input> </wrapper> </mat-form-field> </fro-input-wrapper> This is obviously a very simplified version, but this is how every object looks like. So every button, every text-input, etc has this attribute. What we currently do We map our objects using XPath, since it is so much faster at runtime to find the objects. So we have only one selector for every object, since we don't need more than that. So our XPath for finding the object shown before would look like that: //fro-input-wrapper[contains(@data-testid, 'CONFIG.COMMON.systemName')]//input The issue is, that when we use the TestComplete Object Spy and hover over the Object shown before, TestComplete searches out what it thinks is best suited for mapping the object. Which is totally random and does not conform to the way we want it (like shown above) The TestComplete Mapping looks something like that.... ... Which is just some random way to identify the object. So currently what I created is a Template for every object type (inputfield, slide-toggle, button, ...) that we just copy paste and paste in the correct data-testid. This is the most elegant solution that we found and it works sort of well. But I cant think that we are the only ones using some form of testid on our object. We are thinking about switching to Cypress, since it supports data-testid with a testing-libary, but the issue is that not everyone in our team is a coder and doesn't know how to code in JS. What we want A setting to define any attribute (in our case the data-testid) that TestComplete automatically uses to map the objects. I imagine it working something like that: Using the Object Spy to hover over an object that I want to map TestComplete searches for the data-testid attribute If it doesn't find one in exactly the Object that has been selected, it searches upwards in the DOM tree until it finds an object containing that data-testid attribute. It uses to object to map the original Object that was hovered over. I don't think that this would be too hard to implement and it would greatly improve our workflow., For any questions regarding the issue, please feel free to ask.1.1KViews3likes4CommentsEnable code expressions or variables as default values for keyword test parameters
Hi, when I add parameters to keyword tests, in some cases the default value would correspond to a Project (Suite) variable. Currently, I have to set a local variable and build an if clause like "if parameter not given set local variable value to project variable value".104Views0likes0CommentsImpact Analysis: Find Usage of Keyword Test
In order to identify impacts when changing a keyword script, it would be useful to find what keyword tests use other keyword tests. Example: I have keyword test A and it is used in keyword tests 1, 2, & 3. I'd like to be able to right click keyword test A in the Project Explorer pane and be presented with "Find Usage". Clicking that would result in a list showing keyword tests 1, 2, & 3.1.6KViews15likes4CommentsAllow variables to be passed to database check point custom queries
Would like the ability to pass a variable value into a database checkpoint custom query. E.g. be able to store a case reference that will change each time and add that into the custom query so when calling the database its finding the specified record124Views0likes0Comments