Forum Discussion

Kirkios's avatar
Kirkios
Visitor
10 years ago

In HTTP Test Requests only it appears, [Request URL] field won't except UPPER case.

In HTTP Test Requests only it appears, when trying to type a URL in the [Request URL] field, this field will not except UPPER case for some reason?  I have tried multiple different ways to get upper case in this field:

- With using [Shift], lower case is entered and then the cursor jumps to the end of the URL text in the field?
- With [Caps Lock] on, lower case is still entered and then the cursor still jumps to the end of the URL text in the field?
- When Copy/Paste a completely UPPER cased URL, it is still all shows up in lower case.

- When the URL in my saved project has UPPER case, when I start soapUI and go into the HTTP Test Requests, it shows up in lower case.

This behaviour occurs in version 5.1.2 and 5.1.3 that I know of for sure.  The reason this is an issue for me is that sometimes information that is used in the URL is actually case-sensitive and therefore causes my requests to fail.

 

Again, this behaviour only seems to occur on HTTP Test Requests.  The end-point field in SOAP and REST Test Requests accepts mixed-case with no problems.

 

For this reason, I have converted back to using version 5.0.0 which is the last known version that I am aware of that this type of behaviour doesn't occur.

 

Any ideas?

2 Replies

  • rupert_anderson's avatar
    rupert_anderson
    Valued Contributor

    Hi,

     

    I can't tell you exactly why they decided to force the HTTP Test Request window to force the URL to lowercase, but to work around this I have sometimes used a property expansion (see http://www.soapui.org/scripting---properties/property-expansion.html) to set the URL e.g.

     

    Try setting the "Request URL" like https://www.google.co.uk/?search=${x}#q=${x} 

     

    (or you can also set the whole URL to an expression e.g. ${x} to have full control)

     

    Then to set the value of x, you could set it (in the context) in a Groovy TestStep before the HTTP TestStep e.g.

     

    context["x"]="TeSt"

     

    Running the TestCase containing the two TestSteps will make an HTTP request with a mixed case URL e.g. look in the HTTP Log tab and you'll see:

     

    Mon Apr 20 11:57:49 BST 2015:DEBUG:>> "GET /?search=TeSt#q=TeSt HTTP/1.1[\r][\n]"

     

    Alternatively you could set the value of x from a Global property or system poperty, then not use the Groovy TestStep.

     

    Hope this helps,

     

    Cheers,

    Rupert 

  • ninjoblio's avatar
    ninjoblio
    Regular Visitor

    I just ran into this same problem and had to go load my projects in version 5.0.0 in order to fix the URL for some of my tests that I needed to alter. 

     

    In my case I was switching the URL from a global property to a project property, and the reference for those both need to be in upper case (.i.e ${#Global#foo} and ${#Project#bar})

     

    They kept on getting changed to ${#global#foo} and ${#project#bar}, which results in a null value.