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

is there any simple way to reuse the same script in different project

4 Answers 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Yan
Top achievements
Rank 1
Yan asked on 16 Feb 2012, 03:10 AM
our product is using in different project with different configuration.
but the basic function is the same.
i just want to record one project with all the basic functions, then i can reuse it in different project.

what i did is that after i finish recording one project(the replay is ok),i save all the project with the steps in the name of other project's name.

then in the new project,i just change the first navigate which change the url to the new one.
but the replay didn't work like what i expected.

after that i found, the url of frame is still the same with the first one.
so,do i need to change all the url of the frame by myself one by one?
or there is a simple way to solve it?

thank you

4 Answers, 1 is accepted

Sort by
0
Yan
Top achievements
Rank 1
answered on 16 Feb 2012, 04:00 AM
for example
the baseURL is:http://10.10.198.105/itmsproject/CommonBaseInfo/CodeInfo/CodeClassManager.aspx
i can just change it into:http://10.10.198.105/trunkMes/CommonBaseInfo/CodeInfo/CodeClassManager.aspx
it works

but how can i partial it?
i use:~http://10.10.198.105/^/CommonBaseInfo/CodeInfo/CodeClassManager.aspx
and http://10.10.198.105/~/CommonBaseInfo/CodeInfo/CodeClassManager.aspx
it doesn't work

i think i misunderstand the usage of partial
so can u tell me the right way?

another question,if there are many frames
can i find them all,and partial them all?
0
Anthony
Telerik team
answered on 16 Feb 2012, 06:41 PM
Hello Yan,

See our article on Using BaseURL. In your case the two BaseURLs are:
  • http://10.10.198.105/itmsproject
  • http://10.10.198.105/trunkMes

Note the UsesBaseUrlHost setting explained at the bottom of that article. When you use a BaseURL and set UsesBaseUrlHost to True for each frame, Test Studio will replace the BaseURL portion automatically under the hood.

Alternatively you can use the caret (^) as explained in the next section of that article:
  • ^/CommonBaseInfo/CodeInfo/CodeClassManager.aspx

 
Unfortunately there is not a way to make either change to all frames at once.

Regards,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Yan
Top achievements
Rank 1
answered on 17 Feb 2012, 06:10 AM
i used the way u recommanded, but it didn't work.
i tried these ways:
1.set the UsesBaseUrlHost to true
2.change the FrameInfo BaseURL into ^/System/UserAndRole/UserManage.aspx
3.combine 1&2 together

what did it work was that i changed the baseurl into:
http://10.10.198.105/trunkmes/System/UserAndRole/UserManage.aspx

i upload the files
pls help me find what is the problem
0
Anthony
Telerik team
answered on 17 Feb 2012, 05:23 PM
Hello Yan,

I apologize for misleading you. The UsesBaseUrlHost property should only be set to True when executing against the same app on different servers. It will only replace the host portion of a BaseURL, and should not be used if the BaseURL contains a path portion.

You are executing the same app on the same server, but under different folders. Your frame should have UsesBaseUrlHost set to False and keep the existing format for the frame BaseURL:
  • ^/System/UserAndRole/UserManage.aspx

Setting UsesBaseUrlHost to True and using the caret (^) syntax should not be combined.

In your test you should simply change UsesBaseUrlHost to False. If you continue to have difficulty, provide us with more information so we can continue troubleshooting.


All the best,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Yan
Top achievements
Rank 1
Answers by
Yan
Top achievements
Rank 1
Anthony
Telerik team
Share this question
or