Visual Studio - Data binding Context Parameters

Hi Experts,

I'm creating a web test for a sharepoint site which navigates around the different doc libraries. There are three context parameters which need to be aligned which are SiteName2, SiteName3 and SiteName4. I was thinking of having all the values for these parameters as lines in a csv file or some other dataSource and then read a line at time so the values all match. I tried adding the code {{DocLibraries.DocLibaries#csv.SiteName3}} in the value for the context parameter but it displays exactly as it is written in the request and does not grab the value from the csv file. Just wondering if this can be done and if there is a better way to read multiple values from a datasource which are dependent on each other.

Example request is below

http://collaborate.sptest.nonprod.protected.ind/{{SiteName2}}/{{SiteName3}}/{{SiteName4}}/Forms/AllItems.aspx

Thanks

Gavin
victoriaharryAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Robberbaron (robr)Commented:
sorry, need to elaborate more on what the parameters are to do.
 (and your test site fails to load for me)
0
victoriaharryAuthor Commented:
Hi,

The parameters when used together make up the URL for the request. I need to read these 3 values from a line in a CSV file and could see know way to do this within a web performance test. I know I can add a csv data source but I cannot link the context parameters to the data source.
0
Robberbaron (robr)Commented:
assuming the csv file is on the server, why not just read using a TextReader ?
     string ReadTextFile()
     {
         string inputString;
          using (StreamReader streamReader = File.OpenText(Server.MapPath("~") + @"\AppData\mytest.csv"))
          {
               inputString = streamReader.ReadLine();
             while (inputString != null)
            {
                
                  inputString = streamReader.ReadLine();
              }
         }
       }

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.