Skip to main content
Tweeted twitter.com/StackSQA/status/813053513609736192
improved question
Source Link
Bharat Mane
  • 6.8k
  • 11
  • 41
  • 69

I am automating web UI tests using Selenium. These tests are written partly in the spirit of Unit tests, that is they try their best to leave the application in the same state in which they found it. For instance, if a test registers a support ticket using the web UI, it is expected to remove it and the end of the test using the web UI.

Compared to unit tests, these kinds of tests do much more, not in terms of actual code executed or processes triggered, but in terms of tested actions. One such hypothetical test would be:

  1. (Actor 1) register support ticket;
  2. (Actor 1) comment with initial data;
  3. (Actor 2) reply with request for more information
  4. (Actor 1) upload more information
  5. (Actor 2) comment that issue is fixed
  6. (Actor 1) close issue

All of these actions are verified during a test, and should one fail, the application data is inconsistent.

Is there a better way of making end-to-end tests self-contained and idempotent?

Is there a better way of making end-to-end tests self-contained and idempotent?

I am automating web UI tests using Selenium. These tests are written partly in the spirit of Unit tests, that is they try their best to leave the application in the same state in which they found it. For instance, if a test registers a support ticket using the web UI, it is expected to remove it and the end of the test using the web UI.

Compared to unit tests, these kinds of tests do much more, not in terms of actual code executed or processes triggered, but in terms of tested actions. One such hypothetical test would be:

  1. (Actor 1) register support ticket;
  2. (Actor 1) comment with initial data;
  3. (Actor 2) reply with request for more information
  4. (Actor 1) upload more information
  5. (Actor 2) comment that issue is fixed
  6. (Actor 1) close issue

All of these actions are verified during a test, and should one fail, the application data is inconsistent.

Is there a better way of making end-to-end tests self-contained and idempotent?

I am automating web UI tests using Selenium. These tests are written partly in the spirit of Unit tests, that is they try their best to leave the application in the same state in which they found it. For instance, if a test registers a support ticket using the web UI, it is expected to remove it and the end of the test using the web UI.

Compared to unit tests, these kinds of tests do much more, not in terms of actual code executed or processes triggered, but in terms of tested actions. One such hypothetical test would be:

  1. (Actor 1) register support ticket;
  2. (Actor 1) comment with initial data;
  3. (Actor 2) reply with request for more information
  4. (Actor 1) upload more information
  5. (Actor 2) comment that issue is fixed
  6. (Actor 1) close issue

All of these actions are verified during a test, and should one fail, the application data is inconsistent.

Is there a better way of making end-to-end tests self-contained and idempotent?

Source Link

Should end-to-end tests be self-contained?

I am automating web UI tests using Selenium. These tests are written partly in the spirit of Unit tests, that is they try their best to leave the application in the same state in which they found it. For instance, if a test registers a support ticket using the web UI, it is expected to remove it and the end of the test using the web UI.

Compared to unit tests, these kinds of tests do much more, not in terms of actual code executed or processes triggered, but in terms of tested actions. One such hypothetical test would be:

  1. (Actor 1) register support ticket;
  2. (Actor 1) comment with initial data;
  3. (Actor 2) reply with request for more information
  4. (Actor 1) upload more information
  5. (Actor 2) comment that issue is fixed
  6. (Actor 1) close issue

All of these actions are verified during a test, and should one fail, the application data is inconsistent.

Is there a better way of making end-to-end tests self-contained and idempotent?