I am currently working on a web product where we have a testing strategy that includes end-to-end testing.
Our tech lead is of the opinion that each e2e test should only validate a single feature. For example, we would have a test for creating an account, a separate test for logging in and an other separate test for updating personal info of the account. if I had to picture the idea, I guess it would ideally look like this :
test 1 : create account
test 2 : log into existing account
test 3 : update info of currently logged in account
To me this seems ineficient and hard to maintain because in reality each test is reliant on the previous one and they actually end up running more like this :
test 1 : create account
test 2 : create account -> log into created account
test 3 : create account -> log into created account -> update personal info of the account
When put like this it just seems like only test 3 should be ran because it juste goes through everything. And should on test, say "login", fail then test 2 would fail, as it should, but so will test 3. The "update info" feature is not being tested in either case, test 2 and test 3 both provide the exact same level of information.
I can see how ideally targetting a specific feature is better, since it is supposed to indicate precisely what is broken. But to me it is not achievable in an e2e testing context, so a scenario approach sounds more appropriate.
In your experience are e2e tests written as scenarios (like test 3) or are they targeting a specific feature to test ? If it is the later, did you manage to circumvent the issue I highlighted and if so how ?