2013-05-02

Problem:

SilkTest .Net Extension Kit FAQ

Resolution:

Q. What are the advantages of using the Extension Kit over SilkTest DLL calls?
A. Depending on your needs, DLL calling may be an acceptable solution but functions written with the Extension Kit can run significantly faster and give you greater flexibility. Also the Extension Kit will operate on all platforms, whereas DLL calling will not.

Q. Can the Extension Kit be programmed in any other language e.g. Visual Basic?
A. No. VB does not produce a true dll; rather it produces an ActiveX control that, by making certain calls to system dlls, appears to act like a true dll. The Extension Kit can only be programmed in C or C++; to make full use of the Extension Kit the programmer needs to have a good in-depth knowledge of the C language. It is strongly recommended that the extension is written using pure ANSI-C if the extension is aimed at an application running under Unix or Linux, because in this situation the use of Microsoft Foundation Classes or C++ extensions may not work or may not work correctly.

Q. If I use a Microsoft Visual Studio, which one do I need?
A. You can use either Visual Studio 6.0 or Visual Studio 2003 (not VS2005 or VS2008). Please note that writing extensions in C# is not currently supported.

Q. What version of the dotNet framework does the Extension Kit support?
A. As of version 1.0 of this FAQ, dotNet 1.1 is fully supported but there are no known problems with framework 2.0. This information will be updated when and as necessary.

Q. What sort of extensions can I write?
A. There are two main types of extension; internal and external. Internal extensions have their code contained within the AUT and external extensions communicate via a messaging protocol developed by you. After that, the only limitation is the programmer.

Q. What"s the difference?
A. An internal extension is easier to write but requires deploying assist.dll with the end package. We do not recommend this as any deployed version may conflict with the SilkTest installed version. However, assist.dll can be explicitly linked which is more difficult but gets round the deployment problem. An external extension is slower and initially more difficult to write than either internal version, but has neither of their disadvantages.

Q. How do I write an external extension messaging protocol?
A. The Extension Kit documentation guides you through this process.

Q. Can the Extension Kit process both Unicode and ANSI?
A. It depends. You need to use the version of assist.dll that comes with your copy of SilkTest. SilkTest International ships with a Unicode Agent and SilkTest with an ANSI agent. The table below shows the dependencies:

If your SilkTest Extension Kit is Unicode and the agent is Unicode then the EK can process Unicode and ANSI

If your SilkTest Extension Kit is Unicode and the agent is ANSI then the EK can process ANSI

If your SilkTest Extension Kit is Multibyte and the agent is Unicode then the EK can process Multibyte and ANSI

If your SilkTest Extension Kit is Multibyte and the agent is ANSI then the EK can process ANSI

If your SilkTest Extension Kit is Unicode and the agent is ANSI then the EK can process ANSI

If your SilkTest Extension Kit is ANSI and the agent is ANSI then the EK can process ANSI

Q. Does the Extension Kit provide full mouse and keyboard emulation?
A. Yes.

Q. What about the Windows messaging system? Can I use that?
A. The data passed to each external function always includes the window handle. This means that you can use the Windows messaging system to interact with your custom object.

Q. Can I use the Extension Kit to extend existing SilkTest classes and methods?
A. Yes. The Extension Kit will work with full inheritance from the parent class.

Q. Will I have to write my own network calls to access a remote agent?
A. No. Functions written with the Extension Kit automatically inherit remote procedure calls from the SilkTest Agent.

Q. Can I write server-side extensions too?
A. Yes. You can write extensions that, when properly synchronized, will test both client and server in parallel.

Q. What happens if my server is an unsupported platform?
A. You can use the client application"s own internal messaging protocol to test the server

Q. How do I link the SilkTest agent to my custom extension?
A. The assist.lib file and qapwinek.h files are provided to do this for you.

Q. Can I write/use my own header files?
A. Yes. You link them in the normal way.

Q. Can I create error handling in my extension that works in the same way as the SilkTest RaiseError function?
A. Yes. QAP_RaiseError is provided for this function.

Q. Can I work with graphics?
A. The Extension Kit can be made to uniquely recognize graphical objects using "pseudo tags". The documentation has more information on this.

Q. Can I test an object that has no GUI?
A. Yes. You will need to hook the application"s own API with the Extension Kit.

Q. SilkTest recognizes native AUT methods but not my extension. What s wrong?
A. You must ensure that the agent is started before your extension.

Q. I"ve upgraded SilkTest and my extension doesn"t work anymore. Why not?
A. You must use the current version of assist.dll as supplied with your version of SilkTest.
For an implicitly-linked internal extension: copy the new assist.dll to the application directory
For an explicitly-linked internal extension: rebuild your extension with the new assist.dll

Related documents:

dotNet Extension Kit FAQ.doc

dotNet Extension Kit FAQ.pdf

EK_net.pdf

Old KB# 21090

Show more