Forum Discussion
Dmytro,
1.
Is there any built in code for these and similar methods/properties, without need to invent wheel? What could you suggest?
As far as I know, there is no need to write code like this. Everything should work fine without it:
var myObj = SomeTestedObject();
if (! myObj["Exists"])
// Do something...
The [] operator is redefined for var objects. It automatically checks the availability of the specified method or property and calls this method or property. We have been using it for years to make it easier to call methods via "late binding" in C# (earlier C# versions did not have the dynamic type and, therefore, didn't provide easy late-binding calls).
As far as I understand, you write test code directly in Visual Studio IDE and you "invented a wheel" :-) to make it possible to choose the needed methods and properties from the Code Completion window. Unfortunately, it is impossible to modify the var object definition to provide this kind of Code Completion information, as in general case, the var object corresponds to an arbitrary test object, and the set of its methods and properties is not strictly defined.
When developing the concept of Connected Applications, we expected that users would record (or create) C#Script code in TestComplete and then copy it to C# applications, but not write test commands from scratch in Visual Studio IDE. :-)
2.
No Exceptions on calling TestComplete Api...
This is how TestComplete works. An error in a call to some method or property does not necessarily cause an exception. In many test scenarios, users typically expect that an error in a call will cause an error in the test log rather than an exception and, eventually, stop of the test run. An exception occurs only if something is wrong with a test script, for instance, if you use invalid script statements (e.g. "wihle" instead of "while"). In Connected Applications these errors typically cause compiling errors.
3.
I do like IDEs with a lot of refactoring abilities...
...
For TestComplete API to have accurate code requires a lot of support-code before this can be reached. Please I want to understand it more, and if I wrong, please open my eyes.
Dmytro, I'd say you are untypical QA engineer :-). Quote often, testers don't know any IDE and have little or no programming experience. For these users, working with keyword tests and scripts is easier and more natural. So, we are always attempting to make TestComplete IDE more convenient, powerful and easy-to-use. Nevertheless, we are open to discussing possible Connected App improvements. You can post your suggestions here for discussion, or send them to our Support Team.
Related Content
- 12 years ago
Recent Discussions
- 10 hours ago