cancel
Showing results for 
Search instead for 
Did you mean: 

Done RTFM: need "getting started" on https login functional

New Contributor

Done RTFM: need "getting started" on https login functional

I've done RTFM extensively plus spent 3 hours checking this forum and info out on web.

I need a simple "getting started" that demonstrates how to do https login step for functional testing. I'm not doing SOAP - I'm just trying to use soapUI with loadUI to log into a website using https authentication (not basic auth) make a few journeys to input some data into some forms and test the response times.

I've managed to get soapUI to work with basic auth - but not the through the browser authentication by filling in a web form. At the moment in record mode I cannot get soapUI to accept username and pwd parameters.

A simple tutorial would at least indicate whether I should be able to do this through the browser in record mode - or whether I need to pass the parameters in another way using the soapUI application.

I'm not an ignorant user - worked in many areas of IT. For generalists like me moving on from a working example really helps. soapUI and loadUI could really be useful in our organisation but I won't be able to make a case unless I can find a way to log in via soapUI to the websites we need to test.

Thanks

Chris
9 REPLIES 9
Occasional Contributor

Re: Done RTFM: need "getting started" on https login functio

Hi Chris,

I am facing the same issue...

Did you get any solution on logging in to a website using SOAP UI.

Could you please share if you have any solution ?

Thanks,
Dhivya
Regular Contributor

Re: Done RTFM: need "getting started" on https login functio

So, as an example I will use the SoapUI forum for this.


Step 1) Gather Data
Open Chrome and press F12, navigate to "Network" and click "Preserve Logs"
Log in to this forum
View the POST request that submits your username and password (for this forum it is "http://forum.soapui.org/ucp.php?mode=login&sid=xxx")
Copy the Request URL
Note the Request Payload


Step 2) SoapUI
Create a SoapUI project (test Suite, case etc etc)

Add an HTTP step

Endpoint: Request URL from above

Click plus sign 3 times for the following:
username username
password password
login Login

Change Media Type to "multipart/form-data" and click "Post QueryString"



Step 3) Store session Data

Right click on the TestCase
Click Options
Click "Maintain HTTP Session"


Viola, you are logged in with Session data. All subsequent actions within the test case will be performed as though you are a logged in user.
Remember:Questions are more important than answers.
The answer is 42 I'm a ninja!
Occasional Contributor

Re: Done RTFM: need "getting started" on https login functio

Hi Paul,

Thank you so much for your reply....

I have tried all these steps but I am getting the response as either 'Null' or 'Your session has expired. Please log in again'

Not sure what has to be done.


Thanks,
Dhivya
Regular Contributor

Re: Done RTFM: need "getting started" on https login functio

Typically that means that your sessionID is expired for some reason. Without knowing the details to the security that the webpages uses it will be difficult to assist you. I used here as an example but after further exploratory testing with it, it still did not quite work as desired.

Is there a need to use SoapUI? IE, is there an API that requires user authentication via a web page or would, possibly, Selenium be a better option?
Remember:Questions are more important than answers.
The answer is 42 I'm a ninja!
Community Hero

Re: Done RTFM: need "getting started" on https login functio

Hi,

Did anyone manage to get this to work at all? I followed PaulM's instructions but doesn't appear to actually use the parms I added (username, password) to login - it doesn't appear to actually log in. I did notice that the response (raw and XML) display different sid values to the ones specified in the endpoint if that has anything to do with this. I saved the XML output as an .html file and confirmed it is just the login page on the SoapUI forum.

I'm running v4.6.4 (not the Pro version) so my next option is to try upgrading to the latest version but from other people's comments I'm not sure this is the answer.

If I can get this to work, the company I'm working for will cough up for the floating licences - we want to use SoapUI Pro with the LoadUI component as the principal tool for our functional & load testing of web applications going forward - we can test the API's with SoapUI but there is a GUI component that we will need the users to login using https and perform various transactions on this front end (emulating the typical user load on the system) and without the ability to login using https it means I've gotta go with JMeter - which I've never used before, but I have used SoapUI to exercise various REST API's so SoapUI would be perfect - IF I can get this to work.

From PaulM's last comment it appears he wasn't getting the results he expected but I'm hopeful someone has perfected this option

Many thanks,

rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Regular Contributor

Re: Done RTFM: need "getting started" on https login functio

Well, I just haven't had the time to process through the issues. Replicating HTTP requests can be difficult as they are typically extremely fragile. Content-Type, formatting, and a lot of other factors go into play. That is why, typically, having a utility like Selenium to control the Browser automation would be the preferred method over something like SoapUI.

If you must use SoapUI, ensure that you are viewing the raw requests and have parameterized correctly everything that needs it. A tool like Selenium handles this a lot better since it uses an actual browser and controls the actions like an actual user.

I am still curious as to the Use Case for using SoapUI with this scenario. I have needed to do such actions in the past in order to obtain a session for an API, other than that I would strongly suggest using Selenium.
Remember:Questions are more important than answers.
The answer is 42 I'm a ninja!
Community Hero

Re: Done RTFM: need "getting started" on https login functio

Hey - Cheers for answering PaulM - despite givin me the answer I wasn't wanting!

Essentially the API Discovery component would be quite handy for our functional testing, but I'm more concerned with the Performance Testing.

I want a single repository for our Performance Test Case Suite and don't want to spread it across a number of tools, the Test Manager suggested using Selenium for some of the Performance Testing - but this would be problematic to execute for our final Performance Testing cycle where I'd be emulating the load of a typical day on the system - there is a GUI component to the solution, but there are other messaging components and its just a hassle if I've gotta kick off a lot of Selenium scripts on either different machines or different virtual machines as well as submit the messaging component via SoapUI

Cheers,

rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Regular Contributor

Re: Done RTFM: need "getting started" on https login functio

Hello Rich,

Have you considered LoadUIWeb? This might be a better solution for your needs and stick within the same family of tools.
Remember:Questions are more important than answers.
The answer is 42 I'm a ninja!
New Contributor

Re: Done RTFM: need "getting started" on https login functio

Did you get any solution on logging in to a website using SOAP UI.



_____________________


Fifa Coins