Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 71485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:53:43+00:00 2026-05-10T19:53:43+00:00

I have (after quite a bit of work) a web test that will upload

  • 0

I have (after quite a bit of work) a web test that will upload a file to my SharePoint document library using a file that is included in the test and DeploymentItem that identifies that file so it can be used in the file upload post parameter.

That works great, now ignoring the SharePoint factor for a moment, image that I want to run the webtest as part of a loadtest. That means that the file upload test needs to be run a fair amount of times. That is not so great if I am upload the same file to the same filename all the time.

What I want to do is to create a random file at the target, using the same file data. e.g. I want the file that is uploaded to have the filename ‘image1’ + Guid.NewGuid.ToString() + ‘.jpg’.

Aside from creating a new file on the disc with that name and adding a Deployment item or something to locate the file each time, I am at a loss as how to do this. This is especially a problem as the web test will be run via a test agent on a machine that I will not really be able to create that much code on.

Worst case scenario I will go with deleteing the file after uploading it.

Any ideas on how I can do this?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:53:43+00:00Added an answer on May 10, 2026 at 7:53 pm

    given a scenarion where the file image1.jpg is being set as the deployment item and is being copied to the build target, the following code creates a file available for upload in the manner required

    string image1Location = 'image1' + Guid.NewGuid().ToString() + '.jpg'  System.IO.File.Copy('image1.jpg', image1Location); 

    after the file has been used

    System.IO.File.Delete(image1Location) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple bit of code that won't work, and have no
The commandlink link2 does not have work after an ajax call is made to
Using String.Format how can i ensure all numbers have commas after every 3 digits
After I have opened a file include()ed with gf , how can I copy
I have noticed that after awhile of debug/tweakcode/debug etc that eventually Silverlight starts to
After quite a bit of searching I think my situation is different enough I
So lets suppose we have an action in a controller that looks a bit
I have a Base64 encoded String that contains PDF data. Using the EncdDecd unit
I'm just getting to know regular expressions, but after doing quite a bit of
I'm using Magento 1.6.2, with quite a bit of customization - including a heavily

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.