This is a migrated thread and some comments may be shown as answers.

Command Link Execution

5 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 16 Mar 2018, 12:25 PM

I get differing results when running an entire project vs a single test through the command line.    

As an example, if I run as a single test through the command line 17 requests execute in 13 seconds, no issues.  Running that same test in a project, the first requests takes 60 seconds, and hits the timeout limit. 

5 Answers, 1 is accepted

Sort by
0
Nikolay Petrov
Telerik team
answered on 21 Mar 2018, 11:30 AM
Hi Justin,

Thank you for contacting us.

Please provide additional details on this problem.
 - Do you reproduce this behavior using any sample test project?
 - Can you provide such project to be able to investigate the problem further?

Thank you in advance for your cooperation. I'm looking forward to hearing back from you.

Best Regards,
Nikolay Petrov
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Justin
Top achievements
Rank 1
answered on 29 Mar 2018, 07:35 PM

Hi,

I may have found the trigger of the issue, but I'm not exactly sure why it would cause timeouts.  I attached a screenshot of my Project structure, I think it will help with my explanation.  

I have a Preconditions test that runs as the first test of my project, it sets a project level variable named current_date. For debugging purposes, I placed a copy of the Preconditions test in each folder of my project, so when I ran each folder I didn't get failures because the current_date variable was not set.  While debugging I would run the project from the App, and get no issues with this structure.  But when moving to put this into our CI pipeline, I needed to run it from the command line, and the same project, and each test would timeout on the first step.  

After removing this Preconditions test from each subfolder everything worked fine from the command line perspective.  So it seems that constantly resetting the project level variable was causing the issue.  

0
Oleg
Telerik team
answered on 30 Mar 2018, 02:00 PM
Hello,

Thanks for sharing more details.

It seems highly unlikely that repetitive resetting of a project variable itself could cause the timeouts (because setting a variable is a very simple operation).
From your screenshot I see that you are making an http request (GetMetaDate) to get a Date header and use its value. 

First of all, I would recommend using a coded step to do that, unless there is a specific reason for you to need to get the date from a web service. Since you say that it is just for debugging, I guess a coded step will be OK for your case. Please see the attached sample project that I made for you. Using the coded step can log the timestamp to the execution log and can even set the project level variable (see the screenshot) so you would not need the separate SetVariable step.

In case you still need to use an http request to get the current time, then I guess that there could be a problem with the http request itself when executed from the CI environment. You could try to increase the timeout of the http request or test if the URL of the request can be accessed from the machine that executes the CI tests.

Please try the suggested solutions and let me know if you need further assistance.

Regards,
Oleg
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Justin
Top achievements
Rank 1
answered on 05 Apr 2018, 01:00 PM

Hi Oleg,

To me it's much easier using one service call and set one variable to get the date, but I appreciate the coded step tutorial.  It is much appreciated!

And to be clear I didn't need to set the date constantly, I only needed it one time, it was mistakenly left in my test suite.  I can't speak to why calling it repeatedly would cause the timeout issue, but it most certainly was, as removing that step allowed me to run the test as a project.  

 

 

0
Oleg
Telerik team
answered on 10 Apr 2018, 10:35 AM
Hi,

I am glad that this will not be an issue for your test execution.

Let us know if you have any further questions or feedback. We will be happy to help.

Regards,
Oleg
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Justin
Top achievements
Rank 1
Answers by
Nikolay Petrov
Telerik team
Justin
Top achievements
Rank 1
Oleg
Telerik team
Share this question
or