A test as a criterian acceptance?
I'm new with Scrum. In fact this is the first time I write user stories and I have a question about one. This is my user story:
As an administrator user, I want to lock or unlock a user, to prevent login or so you can do it again.
I want to block users.
I want to unlock users.
I'm not sure if the following one is acceptance criteria or a test:
Log with a user blocked and check that you can't login into the system.
Is that an acceptance criteria or simple a test?
As a guide, whenever I see a user story expressed with a conjunction (and, but, or), it indicates that there might be too much scope.
Your user story contains a couple "or" words, so that may give you a guide to splitting and coming up with more focused stories.
I want to lock or unlock a user
to prevent login or so you can do it again
Always ask why. Look up the practice of the 5 whys. Why do you want to lock a user? Why do you want to unlock a user? Do you want to completely block access, or are there levels of restriction?
A very popular and effective practice is to construct acceptance criteria by using the Given..When..Then structure.
Given: what is your beginning state/condition?
When: what is the event or action?
Then: what is your expected result?
Regarding your proposed acceptance criteria, ask yourself what your starting state is. How do you expect a "blocked user" to try and log in? And how is the "blocked user" informed that they can't get in? Or are they even informed?
To answer your question: Acceptance criteria might be verified through a test. For me this would be okay.
Advise: Put some more detail into your story. A one liner might not be enough.
Acceptance criteria can be simple statements like yours. The key is that they are clear, concise and are easily translateable to tests.