Contributions
How to view documentation for user-defined script routines in code completion panel
When writing a script test, the code completion panel shows a brief description of built-in functions, including the types of parameters and return values, as seen in this image. Is there any way I can make TestComplete show a similar description, including function signature, for user defined functions? At the moment, all I'm seeing in the code completion panel for user-defined functions is a generic method signature, where all parameters and return types are listed as 'Object'. How can I change the signature shown here, and also add a description?468Views1like1CommentRe: Sharing name mappings between page objects when several pages have elements in common
Thanks for your reply. I've looked into conditional name mapping and wildcards as possible solutions, but I'm wondering if it's possible to do the following. Let's say I have two pages in my application, A and B, which share some common elements, but also each have some distinct elements. What I would like is to have three page objects in TestComplete: 1) a page object for elements unique to A, 2) a page object for elements unique to B, and 3) a page objects for elements which are in both A and B. It seems like with conditional name mapping and wildcards, I can only have number 3 - please correct me if I'm mistaken.860Views0likes0CommentsSharing name mappings between page objects when several pages have elements in common
I am testing a web application which consists of a considerable number of web pages with different URLs. As such, each of these pages is mapped as a separate page object by TestComplete. However, all of these pages have the same basic layout and have elements in common; for example, there is menu bar with icons down one side which reveals a hierarchical menu when one of the icons is clicked, as well as a navbar across the top with a dropdown and search box. All of these web pages have identical CSS/Xpath selectors for the elements mentioned, so it would seem logical to only have to map the elements once, and then be able to use them on any of the pages. What I'm having to do currently is map the menu bar, hierarchical menu and navbar for every single page in the application, which is not a trivial number. These elements, particularly the menu bar and hierarchical menu see frequent use in our testing, and it is necessary to include mappings for them in most of the page objects. Not only is this approach cumbersome, but is also undesirable from a maintainability point of view - if the developers change the ids or some other attribute used in a selector, then the selector will have to be manually updated in every single page object. We previously used a C# Selenium-based framework to test the application, and we are thinking of switching over to TestComplete. However, this might prove to be a major hurdle. In our Selenium-based framework, we used inheritance and composition in order to eliminate any duplication in selectors. We would have a base class representing the mot generic page within our application, and a menu bar object, for example, which contained the selectors. All page objects would then inherit from this base class and automatically have access to those selectors, so they only had to be defined once. Is there anything similar that can be done in TestComplete? I know it's possible to use conditional criteria for page objects, e.g. URL = X or Y. This means I could in theory have a single page object containing the elements in both pages, but this isn't quite right, because then all the elements would be shared between them - I only want certain elements to be shared.933Views0likes3CommentsRun a single NUnit test from TestComplete
Hi I am trying to run a single NUnit test from within TestComplete, but I am having some difficulties. I don't want to run all the tests in the .net assembly, just a single one. I have created a unit test item in my project and in the 'Advanced parameters' field, I have entered "--test Demo.Tests.Test2". This should run only the test named 'Test2' within the 'Demo.Tests' class - this is exactly what happens if I use the NUnit console runner by itself, and I expected the same behaviour from TestComplete, as I gather it uses the console runner behind the scenes. However, the actual behaviour I get is somewhat bizarre. TestComplete seems to call the test runner for each test in the assembly separately, and applies my filter to every single run. From the test log we can see that TestComplete has tried to run both Demo.Tests.Test1 and Demo.Tests.Test2. If I view the details of the execution for Test1, I can see that TestComplete has applied my filter for Test2, but has also applied its own filter for Test1. This results in both Test1 and Test2 being executed on this run. Then if I look at the details for the execution of Test2, I can see that TestComplete has applied my Test2 filter, as well as its own Test2 filter. This means Test2 is executed again. Presumably, if I had a Test3 in my test fixture, it would then go on to a third run, and apply filters for Test3 and Test2, and so on. What I want to accomplish is very simple - I just want to execute Demo.Tests.Test2 once, and no other test. Is there any way I can do this, because I haven't been able to find any obvious solution. I have also tried using --where "test == Demo.Test.Test2" as my filter, but this also seems to cause a strange result. As before, it tries to run every single test individually, but also applies the 'where' filter in each case, meaning thatnone of the test runs do anything, except the one meant for Test2. This causes an indeterminate result for all of the tests except Test2. I don't want this cluttering up my test log/reports - if I want to run a single test, and that particular test passes, I just want to see a single 'pass' in my log. For a bit of background, the reason I want to run a single NUnit test is because we are testing a system which incorporates two main applications, one of which is a web application, with the other being a native desktop application. We already have a Selenium framework to test the web application, but many of our tests involve using both the web and desktop applications. We want to be able to create a TestComplete test which utilises the existing Selenium framework for the web parts, which would involve running a specific NUnit test designed for that particular scenario, rather than running the whole suite of tests. Any help with this would be very much appreciated.819Views0likes1Comment