Unplanned
Last Updated: 12 Sep 2016 17:02 by Scott
Scott
Created on: 09 Sep 2016 20:51
Type: Feature Request
1
project level variables
Project level variables are very unreliable for me.

I am not sure what I might have done to cause my state, but a number of tests I just put together were all using a token variable I created at the project level.  I needed to close Test Studio Api and return.  When I returned and loaded the project, none of the tests are recognizing the project level variable no matter what I shift and change. (this was just minutes apart, the token is still valid as when I put it in the test directly with no variable - it works)
5 comments
Scott
Posted on: 12 Sep 2016 17:02
Very excited for the prospect of being able to work with you closely on the development of this project.  Yes I can make time and would be willing to go through these steps with you.

However I spent some time this morning trying to recreate this and have not been able to.

I 'think' I discovered what may have been happening and I think it was user error on my part.  I just discovered that the test properties/variables tab is synced to what the user has selected from the project viewer - not the active tab.  I 'think' what I was doing is having multiple tabs open - was changing the variables for test A and kept trying to run test B.

Perhaps a small feature to sync the various tabs/windows so that when a user is working in a tab - it selects that object in the project list and the properties/variables are for what is being worked on in the tabs.
ADMIN
Valeri Hristov
Posted on: 12 Sep 2016 14:53
Hi Scott, do you have time for a short GoToMeeting session tomorrow (or any other day this week)? We would really like to sort this out and seeing how you use the product would be helpful to diagnose the problem. 

Also it would be great if you could open a new support ticket and send us you project, so we can prepare. You could attach it here too, but I assume you might not want to, as this is a publicly visible site...
Scott
Posted on: 12 Sep 2016 13:57
I think that we are not on the same page.  I found and was using that article before my post.  Also my problem is not in the UI of the application, but in the execution of the test.

Let me explain in more detail.

I have a number of methods exposed which I want to call as a brief smoke test.  I am not moving through a chain of methods which build on each other.  I simply have one test per method and hope to press play and run through them all.

All of these methods require an authorization token which is quite difficult to retrieve.  So I do this manually and set as the value in the project variable.

After some trial and error with variables on the first method or two - I got things working nicely.  As most of the methods were fairly similar and I wanted to build them out faster, I would copy/paste each test and then rename it and change the method route.  A header of Bearer {{token}} was working great for each method.  Verification were working properly too for each one!

Then I needed to restart the gui.  The token was still valid.  However ALL tests immediately began to fail with an unauthorized.  The tests were sending literally "Bearer {{token}}" and were not replacing the variable.  When I picked up the value of the variable and put it into each test - so it was "Bearer asdf-lkga...." they then all worked.  Trying to just put the known value into the variable again would not work.  I had to do some weird stuff of deleting the project variable - adding a test variable - run the test, create a project variable, delete the test variable - then it would work.  Until a gui reset, then back to broken again.

I'm not sure what was going on - but there is certainly a bug here.
ADMIN
Valeri Hristov
Posted on: 12 Sep 2016 06:24
In a few words, the variables are objects that are created at runtime and persisted in memory. The CLI stores the variables in temporary files so that the UI to be able to present them to the user for debugging purposes. The UI intentionally does not load the variables from previous runs because the tests could be different (if a new version comes through the source control for example) and the values could be misleading. If you want the variables back in the UI after you restarted the application, just run the tests again and they will appear.
ADMIN
Kiril Stanoev
Posted on: 10 Sep 2016 10:30
Hi Scott,
This article explains how the variables work: http://docs.telerik.com/teststudio-apis/features/variables

Have a look at it and let us know if the issue still persists.