Function Library for UFT API test like GUI tests?

  • Questions
  • Function Library for UFT API test like GUI tests?
Question ID: 108053
1
0

Can I have a .cs library file which I can associate with the API Test and it will take care of event related code?
My objective is to generate a .cs library file which can have generic code and can be used by multiple API Tests.
In current implementation I have one TestUserCode.cs file for each API Test and all of them are having same generic code.
I would like to set up function library just like UFT GUI Tests.

Marked as spam
Posted by (Questions: 22, Answers: 6)
Asked on December 28, 2017 4:33 pm
38 views
Answers (1)
0
Private answer

The reason that Function Libraries are missing is that API Test uses C# as its scripting language, which is compiled and not interpreted language as compared to VBScript. Hence all your code will have to be compiled before it can be executed.

The UFT API equivalent would be the .dll files you can create with the help of Microsoft Visual Studio and add references to the same to your solution. The DLL is supposed you added references to some dll stored on your local drive.

Hope this helps in a better understanding of the working of the tool and understanding the difference between code sharing approaches of GUI and API.

---
**If this answers your question or is best answer please click the accept link below to help others looking for answers.**
---

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on December 28, 2017 4:35 pm