[Test Framework] Running UTF tests

[Test Framework] Running UTF tests

  
Forge Component
(16)
Published on 26 Mar by Indigo Leap
16 votes
Published on 26 Mar by Indigo Leap

Hi,

I was able to import UTF tests to TestFramework, but when executing a test, it seems that the test SOAP service gets a 0 TestRunUnitTestId which breaks UTF functionality. 

For example, recording asserts and comments requires a non-zero TestRunUnitTestId. Here's an example error message:

System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "OSFRK_OSUSR_POP_TESTRUN_UNITTEST_LOG_OSUSR_POP_TESTRUN_UNITTEST_TESTRUNUNITTESTID". The conflict occurred in database "TAX_OutSystems", table "dbo.OSUSR_POP_TESTRUN_UNITTEST", column 'ID'.

How is the integration with UTF suppose to work?

Br,

Toni

Hello Toni,


After importing the UTF Tests the TestFramework handle those tests as regular SOAPs. What I mean is that the UTF aren't more than regular SOAP calls, with a regular configuration, and what we do is to bootstrap those tests as SOAP API tests.


Can you please share some more detail? 

For example, the configurations on the UI (testcases, teststeps?), what variables are defined and so on.


On top of that, can you please try a SOAP API call, and check if everything runs smooth?


Thank you

Hi Davide,

Here's a screenshot of a unit test method template (see UTF_Template eSpace in the UTF application available in Forge). Notice how the method takes a TestRunUnitTestId in. Are you familiar with this pattern?


If there's a seamless integration between TestFramework and UTF, then I would expect an UTF test run to be created before calling the UTF test. Right?

Br,

Toni


Toni,


We are not creating a test run on UTF, that is the whole point there. TestFramework will execute and keep track of the executions, same as the results. If you want to keep that input variable you will be needing to configure it in TestFramework.


Nevertheless, we are planing on reviewing the integration with the UTF Framework in a near future.

Hi,

Ok if Test Framework is not creating a UTF test run (which makes sense, since it's UTF internal thing), how can Test Framework execute a UTF test? A UTF test requires TestRunUnitTestId (see screenshot above).

Toni 

Hi,


If you don't want to clean up that variable you need to configure it on the Test Framework with a Dummy value, that allows the execution of the test.

Hi,

That's a mandatory parameter for UTF, so I cannot clean it up. Could you give an example of a Dummy value that would allow the execution of the example test in UTF_Template?

Toni