user3531858
user3531858

Reputation: 155

Using Webtest 2017 Why does my Form Post Parameters flip after I checkout the code from the repository?

Using: Webtest 2017 Note: I'm a webtest newbie

I recorded a few steps on a webpage and on one of the pages I am selecting a file I want to upload. In the Webtest script I have a Form Post Parameters folder with two parameters. One being license and the other being File Upload Parameter. When I record the request using Fiddler the request is FileUpload first and license last. Webtest for some reason has license then FileUpload. If I run the test with license then Fileupload the script fails. So I manually cut and paste to have Fileupload and then license, the test will pass. However when I check in my code and then check out the code, the code has license first and Fileupload second so the script will fail.

I'd like to share the script but I am not allowed. So I added the lines below. The File Upload step needs to be first.

Is there a setting I don't have turned on that causes these two files to switch? It could be something simple, but I don't know. I tried to separate the request and have 1 being the fileupload and the second being license, but that wont work. Sorry again that this is a high level description. Let me know if there's anything else I can add to this message to help explain the issue I'm having.

Note: I took a look at the XML and it seems to be setup correctly.

 <FormPostHttpBody>
            <FileUploadParameter 
 Name="DataSource1.Upload_Submit_App#csv.UploadApp" FileName={{DataSource1.Upload_Submit_App#csv.UploadApp}}" ContentType="application/x- 
zip-compressed" GenerateUniqueName="False" UseGuids="False" FileUploadName=" 
{{DataSource1.Upload_Submit_App#csv.UploadApp}}" HtmlEncodeFileName="True" 
 />

 <FormPostParameter Name="license" Value="{&quot;licenseType&quot;:&quot;Free&quot;,&quot;basePrice&quot;:&quot;&quot;,&quot;IsPerDeviceLicense&quot;:false,&quot;trialType&quot;:&quot;TimeBased&quot;,&quot;trialDays&quot;:30,&quot;trialCredits&quot;:100,&quot;usageUnit&quot;:&quot;&quot;}" RecordedValue="{&quot;licenseType&quot;:&quot;Free&quot;,&quot;basePrice&quot;:&quot;&quot;,&quot;IsPerDeviceLicense&quot;:false,&quot;trialType&quot;:&quot;TimeBased&quot;,&quot;trialDays&quot;:30,&quot;trialCredits&quot;:100,&quot;usageUnit&quot;:&quot;&quot;}" CorrelationBinding="" UrlEncode="True" />
          </FormPostHttpBody>

Upvotes: 0

Views: 138

Answers (0)

Related Questions