{"id":4862,"date":"2013-11-14T09:30:04","date_gmt":"2013-11-14T14:30:04","guid":{"rendered":"http:\/\/www.ericfeminella.com\/blog\/?p=4862"},"modified":"2020-03-12T23:00:40","modified_gmt":"2020-03-13T03:00:40","slug":"simplifying-testing-of-sign-up-processes","status":"publish","type":"post","link":"https:\/\/www.ericfeminella.com\/blog\/2013\/11\/14\/simplifying-testing-of-sign-up-processes\/","title":{"rendered":"Simplifying Testing of Sign-up Processes"},"content":{"rendered":"<p>When testing the various steps of account sign-up, creation and activation processess, one must be mindful of designs which call for unique email addresses to be confirmed for each new account. While this is a generally accepted approach, it does pose a slight challenge when end-to-end testing requires email activation from the address with which the account was created.<\/p>\n<h2>Creating multiple Accounts under the same Email Address<\/h2>\n<p>Recently, while implementing an account registration feature, I was looking for a simple means of creating and testing multiple user accounts against a single email address, so as to allow for continuous testing without the need to use different email addresses for each test.<\/p>\n<p>Fortunately, a few clever solutions have been available all along in Gmail which can be leveraged for this very problem (in addition to others).<\/p>\n<h3>The Plus (+) Trick<\/h3>\n<p>Perhaps the simplest means of creating or generating unique email addresses for account creation which will all be sent to the same email address is to leverage the <strong>Plus (+) Trick<\/strong>.<\/p>\n<p>For instance, suppose you are testing account creation and activation and want to confirm the sign-up process at <code>someuser@gmail.com<\/code>. Typically, one would want to test this feature multiple times &#8211; either by means of automated testing, manual integration testing, or the like. In order to test the account creation feature continuously using the same <code>someuser@gmail.com<\/code> account, one can simply create new accounts by appending a plus (+) to their gmail user name, and postfix a unique string of charachters to the plus sign: <\/p>\n<pre lang=\"js\">\r\nsomeuser+test1@gmail.com\r\nsomeuser+test2@gmail.com \r\nsomeuser+test3@gmail.com\r\n...\r\n<\/pre>\n<p>In this example, emails sent to any of the addresses above would all go to <code>someuser@gmail.com<\/code>. With this in mind, it is quite easy to continuously test account creation processess without the need to use multiple (real) email addresses. <\/p>\n<h3>The Dot (.) Trick<\/h3>\n<p>As with the <strong>Plus (+) Trick<\/strong>, similarly, the <strong>Dot (.) Trick<\/strong> can also be employed to test account creation under the same email address.<\/p>\n<p>For instance, to test an account creation and activation process feature continuously using the same <code>someuser@gmail.com<\/code> account, one can simply create new accounts by inserting a dot &#8220;.&#8221; within their gmail user name:<\/p>\n<pre lang=\"js\">\r\nsome.user@gmail.com\r\ns.omeuser@gmail.com \r\nsom.euser@gmail.com\r\n...\r\n<\/pre>\n<p>In this example, emails sent to any of these addresses above would all be sent to <code>someuser@gmail.com<\/code>. <\/p>\n<h2>Concluding Thoughts<\/h2>\n<p>As can be seen in the above examples, both the <strong>Plus (+)<\/strong> Trick and <strong>Dot (.)<\/strong> Trick, respectively, can be used to create and test account sign-up and activation processes against a single email address, greatly simplifying testing. <\/p>\n<p>While the Dot (.) Trick is quite useful, it is obviously limited to a finite combination of pseudo-unique email addresses, and thus, it is better suited for fewer testing scenarios.<\/p>\n<p>For more extensive testing scenarios, the <strong>Plus (+) Trick<\/strong> is much better suited, as it allows for seemingly infinite permutations of the same email address, and is ideal for generating addresses from which account creation is to be tested.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When testing the various steps of account sign-up, creation and activation processess, one must be mindful of designs which call for unique email addresses to be confirmed for each new account. While this is a generally accepted approach, it does pose a slight challenge when end-to-end testing requires email activation from the address with which the account was created. Creating&#8230; <a class=\"read-more\" href=\"https:\/\/www.ericfeminella.com\/blog\/2013\/11\/14\/simplifying-testing-of-sign-up-processes\/\">Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[201,112],"tags":[],"class_list":["post-4862","post","type-post","status-publish","format-standard","hentry","category-quick-tips","category-user-experience-design"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/4862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/comments?post=4862"}],"version-history":[{"count":0,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/4862\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/media?parent=4862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/categories?post=4862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/tags?post=4862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}