Yes you are on the right track: VS 2010 has conditionals.
- In your test, right-click and choose Add Conditional.
- Choose the String Comparison rule, set Use Regular Expression to true, set Value to ^Q.*?$, and set Context Parameter Name to the context parameter containing the username value.
- This will match usernames beginning with Q.
- Add the login request to the conditional, and add the appropriate Find Text rule (that finds the Q-username error message) to the request.
There is no notion of else, unfortunately, so you'll have to make a copy the Conditional node, and in the copy, change the Comparison Operator to Not Equals, and then modify the copied Find Text rule to match the regular non-existing username error message.
The resulting test should look something like:
-If ( {{username}} equals "^Q.*?$" )
-http://login request here
-Validation Rules
-Find Text <--- match Q-username error message
-If ( {{username}} does not equals "^Q.*?$" )
-http://login request here
-Validation Rules
-Find Text <--- match non-existing username error message