I want to test many attempted failed login

I will like to have this command run as much as 10 times . the problem is that after the first line of code runs it fails since its an invalid username and password(which is what I want), but i will like to test what happens when someone tries entering the fake credentials at least 10 times

${result}=    Run special command    -k    --url    https://${url}    auth    login    ${username}    -p${password}

Maybe Run Keyword And Expect Error


Hi @yebubu,

I think Wait Until Keyword Succeeds is just what you want?

This keyword will retry your Run special command until it passes or the retry is exceeded. You can set the time between retries and you can set the number of retries by time or number of times, in your case 10x will retry up to 10 times.

Hope this helps,


1 Like

[Wait Until Keyword Succeeds], Keyword And Expect Error as mentioned is a solid approach

Just to throw something else out there, you could also take the approach of writing a Date Driven Test as another possibly approach, for example: