syntax - Specflow Given When Then BUT? -


i have been using specflow while, without making use of "but" logic.

considering following scenario:

scenario: kiran logs system doesn't click remember me given have username of 'kiran' , password of 'password' when chose login don't chose remember me should logged in , taken home screen username should not remembered 

couldn't "but" steps interchanged "and"?

is there advantage using "but"?

am right in thinking purely readability purposes?

i forward hearing thoughts on this.

many thanks, kiran

yes right, "and" , "but" inter-changeable in gherkin syntax.

however in experience "and" used when indicating user should carry out action, whereas "but" best suited when want highlight user should not perform action; because "but" in english language used in negative context.

hence in example:

but don't chose remember me

is use of "but" not performing action. additionally using "but" makes intent of test explicit , removes possible ambiguities.


Comments

Popular posts from this blog

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

php variable $_SERVER['SERVER_ADDR'] is blank when using crontab -