Skip to main content
added 120 characters in body
Source Link
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623

If the only thing you want is to test if all those error messages are correctly customized, there is a way more efficient solution to this than to invest weeksmonths of work to create test scenarios for each and every error situation, just to make the application show the customized text by a "real" error:. Instead,

  • ask the engineering team to provide some additional, simple, "test customize error texts" feature which allows to display each available error message from the resources on a screen or dialog similar to the screen or form of similar size and style as the dialog or form where it would be displayed regularly, in case an error occuredoccurs.
  • maybe thisask them to build the feature in a way so it will also allow to switch quickly between the original text and the customized text for comparison purposes.

That will avoid any necessity to change theany code fromlike the example abovesnippet from your question, it will avoid the necessity to mock out that proxy, and it will make it easier by an order of magnitude for you as(as well as for QA) to test all customizations. And, as a bonus, it will become trivial to test the customization of error texts which are normally part ofwould otherwise show up only in (almost) unreachable code.

If you want to test if all those error messages are correctly customized, there is a way more efficient solution to this than to invest weeks of work to create test scenarios for each and every error situation to make the application show the customized text by a "real" error:

  • ask the engineering team to provide some additional, simple, "test customize error texts" feature which allows to display each available error message from the resources on a screen or dialog similar to the screen or dialog where it would be displayed in case an error occured.
  • maybe this feature will also allow to switch quickly between the original text and the customized text for comparison purposes.

That will avoid any necessity to change the code from the example above, it will avoid the necessity to mock out that proxy, and it will make it easier by an order of magnitude for you as well as for QA to test all customizations. And, as a bonus, it will become trivial to test the customization of error texts which are normally part of unreachable code.

If the only thing you want is to test if all those error messages are correctly customized, there is a way more efficient solution to this than to invest months of work to create test scenarios for each and every error situation, just to make the application show the customized text by a "real" error. Instead,

  • ask the engineering team to provide some additional, simple, "test customize error texts" feature which allows to display each available error message from the resources on a dialog or form of similar size and style as the dialog or form where it would be displayed regularly, in case an error occurs.
  • ask them to build the feature in a way so it will also allow to switch quickly between the original text and the customized text for comparison purposes.

That will avoid any necessity to change any code like the snippet from your question, it will avoid the necessity to mock out that proxy, and it will make it easier by an order of magnitude for you (as well as for QA) to test all customizations. And, as a bonus, it will become trivial to test the customization of error texts which would otherwise show up only in (almost) unreachable code.

Source Link
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623

If you want to test if all those error messages are correctly customized, there is a way more efficient solution to this than to invest weeks of work to create test scenarios for each and every error situation to make the application show the customized text by a "real" error:

  • ask the engineering team to provide some additional, simple, "test customize error texts" feature which allows to display each available error message from the resources on a screen or dialog similar to the screen or dialog where it would be displayed in case an error occured.
  • maybe this feature will also allow to switch quickly between the original text and the customized text for comparison purposes.

That will avoid any necessity to change the code from the example above, it will avoid the necessity to mock out that proxy, and it will make it easier by an order of magnitude for you as well as for QA to test all customizations. And, as a bonus, it will become trivial to test the customization of error texts which are normally part of unreachable code.