Forum Discussion

shockwave's avatar
shockwave
Occasional Contributor
5 years ago

Test login and password

Hi, can anybody help me how to check login and password on web page? Any video tutorial?

I want to make test step but dont know how. Any help please? Endpoint is the site where test will be done? (http://testovani.kitner.cz/login_app/ Thanks a lot.

7 Replies

  • richie's avatar
    richie
    Community Hero
    Hey shockwave ,

    You state that you want to "check login and password on webpage", but what do you actually mean by this?

    From your description this sounds like front end testing so you'd need a front end test (capture/playback) test tool like Smartbear's TestComplete, rather than ReadyAPI!/SoapUI.

    What makes you think you should be using ReadyAPI!/SoapUI to do your testing?

    Cheers,

    Rich
    • shockwave's avatar
      shockwave
      Occasional Contributor

      Simply, I want to create test case, for example when username and password are inserted correct the Assertion will be green.

      Second test case, when username is correct and password is not inserted correct the Assertion will be red. Can you write me progress please.

       

      Hope I explained it clear.

      Thanks a lot

      • richie's avatar
        richie
        Community Hero
        Hey shockwave,

        You could strictly speaking submit an HTTP POST method to your endpoint's listening API to emulate your two defined testcases using ReadyAPI!/SoapUI, but you would need to determine from your system's requirements the different parameters associated with the URI your endpoint is expecting to do this, but again my question still stands....why do you think you need to do this via ReadyAPI! rather than use a front end capture/playback tool?

        Youve posted your query in the ReadyAPI!/SoapUI forum which doesnt support front end testing.

        Has someone told you, you need to use ReadyAPI!/SoapUI to do your testing?

        Without answering the above questions we're not going to be able to help you.

        Cheers,

        Rich
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi shockwave,

    As richie said, could you please share a bit more information about your project? ReadyAPI allows testing APIs. For this, you will need to have their definition or know how the specific API works. If you aren't familiar with the API you test, you can view it by using ReadyAPI's Discovery dialog. You can find the tutorial here:

    https://support.smartbear.com/readyapi/docs/apis/discover/example.html

     

    In SmartBear, we have some more tools - they allow doing functional testing of your site. They will simulate actions that users do with your site. One of such tools is TestComplete:

    https://smartbear.com/product/testcomplete/overview/

     

    • shockwave's avatar
      shockwave
      Occasional Contributor

      This I needed. How to insert credentials - username and password to SOAPUI POST Request. Then its possible to make Assertion. Thanks. Enclosed 2x screenshot

      • richie's avatar
        richie
        Community Hero
        Hey shockwave,

        It depends on what your endpoint accepts; without knowing what is defined in the underlying contract (which would define the uri/template/query and header parameters for your REST request) its gonna be a bit of a guess on our part. This is the info you need to determine at your end.

        I can give you the following pointers though. Youre using the urlencoded mediatype dropdown which generates the Content-Type header value on your request. Occasionally i've had to populate the body of the request (which you have done using a .json format which is likely to be incorrect) and these requests can use the Post Querystring checkbox...you might need to tick that box.
        Next....the body of your request is using what appears to be a .json name/value for username and password. You need to find out what type the body of the request should be. Its an http request using urlencoded type so id guess you need to use http approach...you havent specified the mediatype dropdown as application/json....you specified it as the urlencoded type.

        E.g. in the body of the request input the following instead of the .json format.

        username=usernamevalue&password=passwordvalue

        Make sure you keep the http content of your request payload all on one line....ive had problems before when the content MUST be on a single line.

        On the second image you uploaded youre using a content match assertion with a value like 'response :403' (im going on memory cos im typing this out on my phone). You csn only use content match assertions on the response IF your response has a payload/body. Does it? Currently the image is displaying the xml tab in the response and its blank (indicating your response doesnt have an xml body). Click on the RAW tab to see the complete content of the response. This will indicate below the headers listed if you have a payload/body in your response and youll be able to tailor your assertions based on that.

        From the above you can see you have a number of issues you need to nail down before you can get this to work. Best and quickest thing to do would be to look at the requirements associated with your endpoint to determine how to build your request in SoapUI (which will define parameters and request body/payload). You could use the approach Tanya suggested earlier in this post and use the REST Discovery function to identify what you need. However i think it would be easier for you to determine what you need by asking someone (e.g. the api developer will know the answers or look at the requirements documentation) rather than use some other soapui functionality as it might be more confusing to you.

        Hope this helps,
        Ta,

        Rich