<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sourojit Das</title>
    <description>The latest articles on DEV Community by Sourojit Das (@sourojitdas).</description>
    <link>https://dev.to/sourojitdas</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F808603%2F00fb68da-e83f-4b77-8322-f3dcff79fb0e.jpeg</url>
      <title>DEV Community: Sourojit Das</title>
      <link>https://dev.to/sourojitdas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sourojitdas"/>
    <language>en</language>
    <item>
      <title>How to set goals for Software Quality</title>
      <dc:creator>Sourojit Das</dc:creator>
      <pubDate>Tue, 17 May 2022 13:47:09 +0000</pubDate>
      <link>https://dev.to/sourojitdas/how-to-set-goals-for-software-quality-2l0d</link>
      <guid>https://dev.to/sourojitdas/how-to-set-goals-for-software-quality-2l0d</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ag6X5HI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/875/1%2AvIPSiZfJn3F9vG_nUG4SFQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ag6X5HI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/875/1%2AvIPSiZfJn3F9vG_nUG4SFQ.jpeg" alt="" width="875" height="1312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setting Goals Together&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Software Quality and Why is it important?
&lt;/h1&gt;

&lt;p&gt;The &lt;a href="https://www.istqb.org/"&gt;International Software Testing Qualifications Board (ISTQB) &lt;/a&gt;, one of the world's leading software certification bodies defines software quality as "The totality of functionality and features of a software product that bear on its ability to satisfy stated or implied needs", whereas the defines software quality as "The degree to which a system, component, or process meets customer or user needs or expectations."&lt;/p&gt;

&lt;p&gt;To get a better idea of what these definitions mean in the context of setting SMART goals for software quality, it is necessary to understand how the lack of Quality has impacted some major organizations in the past, through the following Case Studies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.edn.com/mariner-1-destroyed-due-to-code-error-july-22-1962/"&gt;The Mariner 1 Spacecraft, 1962. NASA &lt;/a&gt;--- In 1962, NASA launched an unmanned space mission for data-gathering to fly past Venus. It barely made its way out of Cape Canaveral, before veering off course. With a dangerous crash-landing on their hands, NASA activated the self-destruct button. The subsequent investigation revealed that a very simple software error, a missing hyphen in a line of code, led to an estimated loss of 18 Million USD (as of 1962), let alone the loss of face.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.zdnet.com/home-and-office/networking/child-support-it-failures-savaged/"&gt;EDS Child Support System, 2004, Government of the United Kingdom &lt;/a&gt;--- In 2004, the UK government introduced a new system to manage the operations of the Child Support Agency (CSA). A Texas-based company called Electronic Data Systems (EDS) was awarded the contract and called it CS2. A plethora of problems plagued it from the initial go-live with over 1,000 reported problems, of which 400 had no known workaround, resulting in around 3,000 IT incidents a week. An internal memo leaked later described the system as badly designed-tested-implemented. Not only did it lead to the UK government spending 768 million GBP instead of the estimated 450 million GBP, but the contractor also announced a fiscal loss of USD 153 million in the subsequent year.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.righto.com/2014/03/the-programming-error-that-cost-mt-gox.html"&gt;Bitcoin Hack, Mt. Gox, 2011 &lt;/a&gt;--- Bacon in the 2010's Mt Gox was the largest bitcoin exchange in the world until a software glitch led to the creation of unredeemable transactions costing them USD 1.5 Million in lost bitcoins. This severe loss, in an already fluctuating market, led to the company declaring bankruptcy a few years later.&lt;/p&gt;

&lt;p&gt;Considering the above three cases, a clear inference is that the software failed in its ability to satisfy stated or implied needs (as defined by ISTQB) or meet customer or user needs or expectations (as defined by IEEE). Thus comprehensively failing the spirit of both the accepted definitions of Software Quality.&lt;/p&gt;

&lt;p&gt;Even though companies spend amounts of money, human resources, and time on QA processes still not being able to achieve the goals is clearly due to a lack of Software Quality.&lt;/p&gt;

&lt;p&gt;Even the &lt;a href="https://itbrief.com.au/story/qa-an-increasing-priority-as-more-businesses-invest-in-digital-transformation"&gt;12th edition of the World Quality Report 2020--21 &lt;/a&gt;lists " QA is a key business priority for organizations to achieve digital transformation", the Consortium for Information &amp;amp; Software Quality (CISQ) records in its &lt;a href="https://www.it-cisq.org/pdf/CPSQ-2020-report.pdf"&gt;2020 report &lt;/a&gt;that poor quality software costs US companies over USD 2 trillion annually.&lt;/p&gt;

&lt;p&gt;Diligent QA Leaders would always seek to ensure optimal software quality for their organizations and set quality goals in the software testing process to avoid such fatal consequences, and this article aims to aid them in their endeavor of Setting SMART goals for Software Quality.&lt;/p&gt;

&lt;h1&gt;
  
  
  Overview of Software Testing Objectives
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l9Nwxofg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2AZNVlGXEm8vTkdA15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l9Nwxofg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2AZNVlGXEm8vTkdA15.png" alt="" width="512" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://senuri.medium.com/objectives-of-testing-4832858f6f7d"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The major objectives of any software testing process are outlined in the diagram above. Any attempt to set quality goals for software development will need to take these objectives into account.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Prevent Defects: The most important objective of any Software Quality process is to prevent bugs in the software development process. Early defect detection reduces the costs and labor associated with fixing these defects. By conducting a root cause analysis of previous defects, we can also future-proof our solution against any future flaws.&lt;/li&gt;
&lt;li&gt; Evaluate Work Product: Any goal of a software quality assurance process demands the creation of artifacts that help set in the context of the product being developed. The principles of agile development demand a &lt;a href="https://www.browserstack.com/guide/what-is-shift-left-testing"&gt;shift left in terms of QA &lt;/a&gt;, i.e. identifying any ambiguity or contradictory requirements in the requirement document, design, and user stories before development begins to save significant time and cost in the future.&lt;/li&gt;
&lt;li&gt; Verify Requirements: Meeting the needs of the client is the primary aim of the software development process. Any and all software testing goals gravitate around ensuring that the expected standards are met, and QA techniques are developed to ensure full compliance with both industry standards and user expectations.&lt;/li&gt;
&lt;li&gt; Validate test objects: All test objects need to be validated in order to ensure that they meet the expectations set by the business requirements of the project. Both manual, as well as automation test procedures, can be implemented to ensure the validity of the test objects.&lt;/li&gt;
&lt;li&gt; The bedrock of client confidence in a project is the Build Confidence:&lt;a href="https://www.browserstack.com/guide/setup-qa-process"&gt;software QA process&lt;/a&gt;. Having a low number of or ideally no defects during user acceptance testing and presenting the clients with comprehensive test reports is a surefire way to build confidence in your product.&lt;/li&gt;
&lt;li&gt; Reduce Risk: A major goal of any software quality process is to try out as many possible scenarios while testing the product, in the shortest possible time, to identify and root out any risks during deployment.&lt;/li&gt;
&lt;li&gt; Share Information to stakeholders: An essential goal for any software quality process is to provide the relevant stakeholders with objective and accurate information to make an educated judgment of the quality of the tested product. Test Coverage reports and other &lt;a href="https://www.browserstack.com/guide/essential-qa-metrics"&gt;software testing metrics &lt;/a&gt;can cover these bases.&lt;/li&gt;
&lt;li&gt; Find Failure and Defects: The primary goal of any software QA process is to test the software as thoroughly as possible to uncover any bugs and ensure superlative software quality.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These software quality objectives provide a useful yardstick for the QA team to evaluate and modify any software testing goals based on their progress. These also enable us to understand the activities which lead to the fulfillment of these objectives to meet our software quality goals.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to Set Goals for Software Quality
&lt;/h1&gt;

&lt;p&gt;1. Understand what's most important, get buy-in from your stakeholders&lt;/p&gt;

&lt;p&gt;Before we set any goals for software quality, it is important to understand what are the customer's primary objectives from the software test process. Depending on what the user wants, it is important to ask a variety of questions -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  How long will the testing process take?&lt;/li&gt;
&lt;li&gt;  How much money does the test process require?&lt;/li&gt;
&lt;li&gt;  How much of the software can be tested through automation?&lt;/li&gt;
&lt;li&gt;  Has the test effort been adequate? Could more tests have been executed in the same time frame?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The primary goal for software quality management in software engineering should be to measure software performance across the entire user journey. That means considering the entire user journey from login to checkout. The users should be guaranteed the desired experience at every stage of the user journey.&lt;/p&gt;

&lt;p&gt;This stage of the process helps to check the boxes for Building Confidence and Sharing Information with stakeholders from the objectives mentioned above.&lt;/p&gt;

&lt;p&gt;2. Define a SMART Goal&lt;/p&gt;

&lt;p&gt;Once the QA Leader has a roadmap for setting the software quality goals, they should set SMART goals to obtain clarity and motivation to complete actionable tasks. By having defined objectives and fixed deadlines, they are more likely to achieve success in what matters rather than just pluck low-hanging fruit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NTR51EEW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2APumKjR5iRamqQsq3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NTR51EEW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2APumKjR5iRamqQsq3.png" alt="" width="512" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The SMART acronym stands for -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Specific: Having a very specific goal. It is best to stick to one very objective aim for every action item&lt;/li&gt;
&lt;li&gt;  Measurable: It is important to make sure that the goal set is measurable in some objective terms to evaluate whether it has been achieved. This can be set in terms of &lt;a href="https://www.browserstack.com/guide/code-coverage-vs-test-coverage"&gt;code coverage or test coverage &lt;/a&gt;. There are also a plethora of &lt;a href="https://www.browserstack.com/guide/what-are-right-testing-metrics"&gt;software testing metrics that help in quantifying the software testing process.&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  Attainable: The goals created should be realistic. There shouldn't be any limitations on how big or small it can be, but it should be completed within the time frame determined.&lt;/li&gt;
&lt;li&gt;  Relevant: The goal should be important to both the QA team as well as the rest of the stakeholders. This is why the previous step is of utmost importance.&lt;/li&gt;
&lt;li&gt;  Time-Bound: It is best to assign an end date to the goal so that it doesn't get overtaken by the rush of day-to-day activities. Following an &lt;a href="https://www.browserstack.com/live-for-teams"&gt;agile testing process &lt;/a&gt;helps define the workload into manageable sprints which help in fulfilling these objectives.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pro Tip: &lt;a href="https://www.browserstack.com/users/sign_up"&gt;Try Testing on Real Device Cloud for Free&lt;/a&gt; &lt;em&gt;Continuous Testing helps the companies develop software that is customer-centric and simultaneously in line with healthy development practices. Bear in mind that the resultant code's accuracy can only be guaranteed when it is tested on a&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  " reduce the number of defects by 20% during the next quarter" --- assuming that the number of bugs reported during a previous quarter is known;&lt;/li&gt;
&lt;li&gt;  " keep re-work time below 25% of the total time spent on development in every sprint";&lt;/li&gt;
&lt;li&gt;  " increase internal testing effectiveness" --- targeting a defect detection rate (before vs. after delivery) higher than, let's say, 80% per release or major milestone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.browserstack.com/real-device-cloud"&gt;&lt;em&gt;real device cloud &lt;/em&gt;&lt;/a&gt;&lt;em&gt;. BrowserStack's *3. Elucidate the activities required to reach the goal &lt;a href="https://www.browserstack.com/cloud-selenium-grid"&gt;&lt;em&gt;cloud Selenium grid &lt;/em&gt;&lt;/a&gt;*equips QAs with 3000+ real browsers and devices for automated testing so that every feature can be monitored in real-world circumstances.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Plans for &lt;a href="https://www.browserstack.com/guide/how-to-train-engage-and-manage-qa-team"&gt;training your staff &lt;/a&gt;on required automation suites or other processes that will improve the overall QA practice.&lt;/li&gt;
&lt;li&gt;  R&amp;amp;D activities to ensure the election of the &lt;a href="https://www.browserstack.com/guide/10-test-automation-best-practices"&gt;best automation tool &lt;/a&gt;, and the adoption of best practices for your QA process.&lt;/li&gt;
&lt;li&gt;  Setting up a &lt;a href="https://www.browserstack.com/guide/continuous-testing-strategy-for-devops"&gt;Continuous Testing process &lt;/a&gt;if possible. This ensures that all code is run through a series of tests from the smallest unit to entire components before they are merged to the main repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some examples of such quality objectives are:&lt;/p&gt;

&lt;p&gt;Reviews&lt;/p&gt;

&lt;p&gt;An example of a bad quality objective could be something vague like "Reduce the number of bugs in every sprint", as it is not really achievable or time-bound!&lt;/p&gt;

&lt;p&gt;Tests&lt;/p&gt;

&lt;p&gt;Defining SMART goals helps in Evaluating Work Products, Building Confidence, and Sharing Information with stakeholders from the objectives mentioned above.&lt;/p&gt;

&lt;p&gt;The activities required to achieve the set goals for software quality can be defined in 3 ways:&lt;/p&gt;

&lt;p&gt;These include:&lt;/p&gt;

&lt;p&gt;An appraisal is an objective evaluation of an artifact against a defined set of standards. It consists of -&lt;/p&gt;

&lt;p&gt;These are periodic checks of the test process, the progress of test execution, and even the documents created during the software development lifecycle to ensure that the activities being performed on a daily basis are in sync with the user goals and customer requirements.&lt;/p&gt;

&lt;p&gt;4. Determine the resources available to see if they are sufficient to match your goals&lt;/p&gt;

&lt;p&gt;This is the backbone of any software quality management process. Tests must be performed often and as early as possible. &lt;a href="https://www.browserstack.com/guide/automation-testing-tutorial"&gt;Test automation&lt;/a&gt; and &lt;a href="https://www.browserstack.com/guide/what-is-parallel-testing"&gt;parallel testing&lt;/a&gt; are two ways to speed up the test process and ensure faster test coverage in minimal time. The entire QA process hinges on the use of a &lt;a href="https://www.browserstack.com/real-device-cloud"&gt;real device cloud &lt;/a&gt;. Without real device testing, it is not possible to identify every possible bug a user may encounter. Naturally, undetected bugs cannot be tracked, monitored, or resolved. Moreover, without procuring accurate information on bugs, QA metrics cannot be used to set baselines and measure success. This is true for &lt;a href="https://www.browserstack.com/guide/manual-testing-tutorial"&gt;manual testing &lt;/a&gt;and &lt;a href="https://www.browserstack.com/guide/automation-testing-tutorial"&gt;automation testing &lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  CoP is the cost of prevention resources and activities;&lt;/li&gt;
&lt;li&gt;  CoN is the cost of non-conformities: efforts needed to fix defects, re-testing and reworking / refactoring your product;&lt;/li&gt;
&lt;li&gt;  CoA is the cost of appraisals: review time, testing of new or changed functionalities, independent verification, validation, or audit sessions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Audits are usually done by an independent auditor outside of the QA team. They evaluate the work against existing industry standards like ISO standards and so on. Audits need to be planned carefully, defined using a standard model like CMMI, and formalized into a report to share with the stakeholders. Any areas of discrepancy must be converted into a set of SMART goals to ensure full compliance with industry standards.&lt;/p&gt;

&lt;p&gt;5. Time your activities to suit your goals and objectives&lt;/p&gt;

&lt;p&gt;NOTE: BrowserStack has achieved SOC2 Type 2 compliance, uses HTTPS by default, stores credentials securely, and does much more to ensure the security of our users. &lt;a href="https://www.browserstack.com/policy/security"&gt;Please read our security documentation &lt;/a&gt;for detailed descriptions of our policies and controls.&lt;/p&gt;

&lt;p&gt;6. Monitor Quality Objectives continuously&lt;/p&gt;

&lt;p&gt;These include the efforts to fix the bugs found during testing. A plethora of associated tasks like changing the team structure, testing tool, or test methodology can also be part of this activity.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;This step helps to Prevent Defects, Validate test objects, Reduce Risk, Share Information with stakeholders, and Find Failures and Defects from the objectives defined initially.&lt;/p&gt;

&lt;p&gt;There are 3 "actors" in the team who coexist and influence the team dynamic. These are the people (including their skills, availability, and knowledge), the technology (that supports the QA process), and the work processes (waterfall, agile, DevOps, and so on). There must be a balance between these three to ensure the optimal creation and fulfillment of software quality goals. However, there is a "cost" to this balance, and that can be summed up using the following formula -&lt;/p&gt;

&lt;p&gt;A successful quality assurance plan will aim to keep the CoQ within an acceptable range in the overall project's budget.&lt;/p&gt;

&lt;p&gt;Some of the activities described above are once-off activities like Audits, or defining SMART goals. However, others are more continuous. Any processes related to review, verification, and validation will be repetitive across sprints for an agile process for instance.&lt;/p&gt;

&lt;p&gt;Once the goals have been set, it is important to monitor them continuously in order to ensure that they are relevant to the project and that they are optimal in satisfying the overarching need to adhere to agreed quality standards and user expectations.&lt;/p&gt;

&lt;p&gt;In the course of this article, we have defined what software quality means, why is it important for software engineering teams, and how to set about defining goals to meet it. Creating SMART goals for software quality helps keep the process within an agreed time frame and budget, and keeps the team focused on what is most critical for the success of a software project.&lt;/p&gt;

&lt;p&gt;When done correctly, the returns from setting Software Quality Goals in terms of team and customer satisfaction, defect reduction, and product quality are undeniable. Add to that the advantage of being seen as acting towards a goal, rather than reacting to what is happening in the SDLC process, which builds customer confidence in the product and leads to a real quality product and not one that barely does what it is set out to do.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How To Perform Salesforce Testing</title>
      <dc:creator>Sourojit Das</dc:creator>
      <pubDate>Sat, 23 Apr 2022 10:08:16 +0000</pubDate>
      <link>https://dev.to/sourojitdas/how-to-perform-salesforce-testing-1cph</link>
      <guid>https://dev.to/sourojitdas/how-to-perform-salesforce-testing-1cph</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--15WtXVMQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2Al-zvThIBZgH5EUgY6-oYFg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--15WtXVMQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2Al-zvThIBZgH5EUgY6-oYFg.jpeg" alt="" width="880" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No more long-winded discussions about Salesforce Testing&lt;/p&gt;

&lt;p&gt;The key goal of any business is to ensure customer satisfaction. Businesses invest a lot of time and effort into satisfying the customer base with an emphasis on rapid and efficient customer interactions, thus underlining the need for efficient CRM products in the market.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is CRM?
&lt;/h1&gt;

&lt;p&gt;According to market leader &lt;a href="https://www.salesforce.com/eu/learning-centre/crm/what-is-crm/"&gt;Salesforce&lt;/a&gt;, a CRM can be defined as "a strategy that companies use to manage interactions with customers and potential customers. CRM helps organizations streamline processes, build customer relationships, increase sales, improve customer service, and increase profitability." It is also known as Customer Relationship Management (CRM).&lt;/p&gt;

&lt;p&gt;CRM tools have been on the rise for the past couple of years and it is very important for growing a business. Some benefits of a CRM software are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Improving efficiency: Having a central data repository ensures better team collaboration, workflow, and project management.&lt;/li&gt;
&lt;li&gt;  Customer retention: By relying on a single source of truth, there is more confidence in working with customers which enhances customer relations.&lt;/li&gt;
&lt;li&gt;  Transparency: Everyone has an idea about the processes, and can work with more clarity and better teamwork&lt;/li&gt;
&lt;li&gt;  Increased sales: By streamlining the sales process, pipeline building a task automation and sales data analysis will significantly improve your sales&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What is Salesforce?
&lt;/h1&gt;

&lt;p&gt;With a plethora of CRMs available in the market today, each provides its own set of benefits. However, Salesforce, the world's first cloud-based CRM remains the market leader in helping its clients sell, service, market, analyze, and connect with their clients in an affordable and hassle-free manner.&lt;/p&gt;

&lt;p&gt;As per a &lt;a href="https://www.gartner.com/en/documents/4002572"&gt;Gartner report&lt;/a&gt;, the global CRM market grew from $61.6 billion in 2019 to $69.3 billion in 2020, reflecting an increase of 12.6%, and is currently the world's third-fastest growing segment in the IT space.&lt;/p&gt;

&lt;p&gt;The Worldwide Semiannual Software Tracker by the International Data Corporation (IDC) has ranked Salesforce #1 in Customer Relationship Management Solutions for the eighth consecutive year running and its data clearly shows Salesforce rising head and shoulders above its competitors over the last few years.&lt;/p&gt;

&lt;p&gt;This clearly highlights the need for Salesforce Testing in particular, and CRM testing in general to any QA Leaders intent on streamlining their process for a seamless customer experience.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Salesforce testing and why test salesforce applications?
&lt;/h1&gt;

&lt;p&gt;The main goal of Salesforce testing is to test the customized application features, rather than those built into SalesForceDotCom (SDFC).&lt;/p&gt;

&lt;p&gt;Since one of the most important USPs of SFDC is the fact that everything in it can be customized based on user requirements, Salesforce testing of these features serves to guarantee that any enhancements or custom features will not fail in production, or throw a spanner in the works of other elements in the SF application.&lt;/p&gt;

&lt;p&gt;Testing the custom features in SDFC is important because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  It allows us to check if the code is functional.&lt;/li&gt;
&lt;li&gt;  It helps verify that the application can cater successfully to client needs based on business requirements.&lt;/li&gt;
&lt;li&gt;  It helps catch issues early in testing, making them easier to fix.&lt;/li&gt;
&lt;li&gt;  With the help of functional flows, we can obtain a report on the basis of test case statuses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Initially, Salesforce services were offered using its Classic Platform, popularly known as Aloha. This was in vogue during the 2000s and was supplemented by Force.com which was SF's first PaaS (Platform as a Service) offering. This could allow clients to build custom applications on top of Salesforce without any additional software.&lt;/p&gt;

&lt;p&gt;In more recent years, SF has offered the Lightning platform to its clients which comes with a number of additional functionality and security features, as well as an improved UI experience.&lt;/p&gt;

&lt;p&gt;For the purposes of this article, we shall be dealing with the Salesforce Lightning platform.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Scope of Salesforce Testing
&lt;/h1&gt;

&lt;p&gt;Like any other platform, Salesforce applications also undergo the same phases of the software testing life cycle as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8IR4xnx1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AMWCghEXL6o_iwF_s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8IR4xnx1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AMWCghEXL6o_iwF_s.png" alt="" width="512" height="108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A short description of these types with examples is discussed below:&lt;/p&gt;

&lt;p&gt;This is done mainly by developers themselves to test the code they wrote. These tests are not restricted to any specific user scenarios and tend to be highly specific.&lt;/p&gt;

&lt;p&gt;Example: A developer has scripted a password input text field with its validation ar (8 characters long, must contain special characters.); makes a unit test to test out this one specific text field (has a test that only inputs 7 characters, no special characters, empty field)&lt;/p&gt;

&lt;p&gt;Testers / QA professionals mainly perform this. It revolves around use cases and functional system requirements. Testers generally have no understanding of the code (also known as Black Box Testing).&lt;/p&gt;

&lt;p&gt;Example: A tester writes a test case to ensure that the password is accurately saved in the database after generating one. This ensures that the code written by the developer is integrated with the system's database.&lt;/p&gt;

&lt;p&gt;User Acceptance Testing&lt;/p&gt;

&lt;p&gt;Acceptance testing determines if a software system meets all predetermined specifications. It evaluates if the system complies with business, technical, and aesthetic requirements so that business stakeholders and end-users can be satisfied alike.&lt;/p&gt;

&lt;p&gt;Acceptance tests are generally divided into User Acceptance Testing and Business Acceptance Testing. The former checks to ensure that the product is meeting all performance standards from the users' perspective while the latter establishes that the &lt;a href="https://www.browserstack.com/guide/how-to-set-goals-for-software-quality-assurance"&gt;software aligns with business goals&lt;/a&gt; and requirements.&lt;/p&gt;

&lt;p&gt;Example: The client tests a particular functionality, like adding a customer to the CRM on a custom module on-site&lt;/p&gt;

&lt;p&gt;Both the QA team and end-users perform testing in the production environment.&lt;/p&gt;

&lt;p&gt;Example: Checking for customer creation and deletion processes in the CRM after go-live.&lt;/p&gt;

&lt;p&gt;This can be done in both a manual as well as an automated manner. The main purpose of this &lt;a href="https://www.browserstack.com/guide/types-of-testing"&gt;type of testing&lt;/a&gt; is to check whether any changes made to a custom functionality have not impacted other functionalities and everything works as before&lt;/p&gt;

&lt;p&gt;Example: Checking for the login functionality after a new UI has been designed for the login page.&lt;/p&gt;

&lt;p&gt;Of these many types of testing, the &lt;a href="https://www.browserstack.com/guide/unit-testing-frameworks-in-selenium"&gt;Selenium Unit tests&lt;/a&gt; need to be written in the APEX programming language used by Salesforce, whereas the others can be done either manually or using an automation test tool like &lt;a href="https://www.browserstack.com/selenium"&gt;Selenium&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to perform Salesforce Unit Testing in APEX
&lt;/h1&gt;

&lt;p&gt;The @isTest is used to define classes and methods that only contain code used for testing the application.&lt;/p&gt;

&lt;p&gt;A sample format would be&lt;/p&gt;

&lt;p&gt;@isTest private class MyTestClass { @isTest static void test1() { // Implement test code } @isTest static void test2() { // Implement test code } }&lt;/p&gt;

&lt;p&gt;Below are a few examples of implementing Unit tests for some common Salesforce constructs:&lt;/p&gt;

&lt;p&gt;A trigger is an APEX script that executes prior to or posts a Data Manipulation Event (DML). These allow the performance of custom actions before or after a record has undergone insertion, update, or deletion.&lt;/p&gt;

&lt;p&gt;@isTest public class TriggerTestClass { static testMethod void testMethod1() { // Perform DML here only } }&lt;/p&gt;

&lt;p&gt;For Standard Controllers&lt;/p&gt;

&lt;p&gt;A standard controller takes a record and places it in a variable that it makes available to a page.&lt;/p&gt;

&lt;p&gt;@isTest public class ExtensionTestClass { static testMethod void testMethod1() { Account testAccount = new Account(); testAccount.Name='Test Account record' ; insert testAccount; Test.StartTest(); ApexPages.StandardController sc = new ApexPages.StandardController(testAccount); myControllerExtension testAccPlan = new myControllerExtension(sc); PageReference pageRef = Page.AccountPlan; // Add your VF page Name here pageRef.getParameters().put('id', String.valueOf(testAccount.Id)); Test.setCurrentPage(pageRef); //testAccPlan.save(); call all your function here Test.StopTest(); } }&lt;/p&gt;

&lt;p&gt;Some best practices for Unit testing in Salesforce include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Test class should be annotated with @isTest.&lt;/li&gt;
&lt;li&gt;  Classes with @isTest annotation can't be an interface or enum.&lt;/li&gt;
&lt;li&gt;  Test method should be static and no void return type.&lt;/li&gt;
&lt;li&gt;  Starting with the Salesforce API 28.0 test method can not reside inside non-test classes.&lt;/li&gt;
&lt;li&gt;  To deploy to production at least 75% code coverage is required&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Manual and Automation Tests for Salesforce
&lt;/h1&gt;

&lt;p&gt;Once the developers are happy with the &lt;a href="https://www.browserstack.com/guide/code-coverage-vs-test-coverage"&gt;test coverage&lt;/a&gt; through Unit Tests in Salesforce, it is time to perform a variety of &lt;a href="https://www.browserstack.com/guide/manual-vs-automated-testing-differences"&gt;manual or automation tests&lt;/a&gt;. However, before we start testing the SF applications, we must ensure to set up a Sandbox that allows us to perform these tests in isolation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://help.salesforce.com/s/articleView?id=sf.create_test_instance.htm&amp;amp;type=5"&gt;Salesforce Sandbox&lt;/a&gt; testing can be done on a variety of Sandbox types like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Developer Sandbox: This is intended for development and testing in an isolated environment, This contains a copy of the production environment's configuration.&lt;/li&gt;
&lt;li&gt;  Developer Pro Sandbox: This can host larger sets of data than the vanilla Developer Sandbox, and has the capacity for increased development and quality assurance tasks and for integration testing or user training.&lt;/li&gt;
&lt;li&gt;  Full Sandbox: This is meant as a dedicated &lt;a href="https://www.browserstack.com/guide/what-is-test-environment"&gt;testing environment&lt;/a&gt;, and supports &lt;a href="https://www.browserstack.com/guide/performance-testing"&gt;performance testing&lt;/a&gt;, load testing, and staging. They are intended as a replica of the production org, including all data, such as object records and attachments, and metadata. However, the significant lag due to the refresh interval makes them unsuitable for development purposes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Variety of licenses can be purchased for these Sandbox types as per your requirement.&lt;/p&gt;

&lt;p&gt;Pro Tip: &lt;em&gt;No emulator or simulator can replicate &lt;/em&gt;&lt;a href="https://www.browserstack.com/real-user-conditions-testing-on-browserstack"&gt;&lt;em&gt;real user conditions&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. Software needs to be tested on real devices to work in real-world circumstances such as a low battery, incoming calls, weak network strength, and so on. If an in-house lab is not accessible, opt for a &lt;/em&gt;&lt;a href="https://www.browserstack.com/real-device-cloud"&gt;&lt;em&gt;real device cloud&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Manual Tests in Salesforce
&lt;/h2&gt;

&lt;p&gt;Manual testing, as the term suggests, refers to a test process in which a QA manually tests the software application in order to identify bugs. To do so, QAs follow a written test plan that describes a set of unique test scenarios. The QA is required to analyze the performance of the web or mobile application from an end user's perspective.&lt;/p&gt;

&lt;p&gt;For the purposes of this article, take a simple positive &lt;a href="https://www.browserstack.com/guide/how-to-create-test-scenarios"&gt;test scenario&lt;/a&gt; of a successful login to the Salesforce site and &lt;a href="https://www.browserstack.com/guide/how-to-write-test-cases"&gt;write a brief test case&lt;/a&gt; accordingly.&lt;/p&gt;

&lt;p&gt;Test Steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; The user navigates to the &lt;a href="https://login.salesforce.com/?locale=us"&gt;Salesforce login page&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QAu7s1-h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AqA6Pf5AA1_WOqW5B.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QAu7s1-h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AqA6Pf5AA1_WOqW5B.png" alt="" width="512" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; In the 'email' field, the user enters their registered email address.&lt;/li&gt;
&lt;li&gt; The user enters the registered password.&lt;/li&gt;
&lt;li&gt; The user clicks 'Login.'&lt;/li&gt;
&lt;li&gt; The user is redirected to the Home page&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Test Scenario: To authenticate a successful user login on Salesforce.com&lt;/p&gt;

&lt;h2&gt;
  
  
  Automated Tests in Salesforce
&lt;/h2&gt;

&lt;p&gt;Automation Tests in Salesforce can be done using a variety of tools. However, we will consider test automation using Selenium With Java for the purposes of this article.&lt;/p&gt;

&lt;p&gt;Selenium is compatible with multiple operating systems like Windows, Linux, Solaris, and Macintosh. It also supports multiple browsers like Chrome, Safari, IE, Edge, and Firefox. It is used to &lt;a href="https://www.browserstack.com/automated-functional-testing"&gt;automate functional tests&lt;/a&gt;. Also, Selenium is easy to integrate with tools like Jenkins, Maven, and Docker to achieve a &lt;a href="https://www.browserstack.com/guide/continuous-testing-strategy-for-devops"&gt;continuous testing approach&lt;/a&gt;. Tools like &lt;a href="https://www.browserstack.com/guide/testng-framework-with-selenium-automation"&gt;TestNG&lt;/a&gt; and &lt;a href="https://www.browserstack.com/guide/junit-and-automation-testing"&gt;JUnit&lt;/a&gt; further help in structuring the selenium tests for easy maintainability and generating reports.&lt;/p&gt;

&lt;p&gt;For the purposes of this test, we shall build upon the example for manual testing shown above, and add a few features. This test will demonstrate how to use &lt;a href="https://www.browserstack.com/guide/selenium-with-java-for-automated-test"&gt;Selenium with Java&lt;/a&gt; to create a custom field for a custom object.&lt;/p&gt;

&lt;p&gt;Step 1: Login to the Salesforce&lt;/p&gt;

&lt;p&gt;To launch the website in a browser of your choosing, set the system properties to the path of the required driver for the browser. Since this example uses Google Chrome, it should be set to the &lt;a href="https://www.browserstack.com/guide/run-selenium-tests-using-selenium-chromedriver"&gt;ChromeDriver&lt;/a&gt;. The code for the same is as follows&lt;/p&gt;

&lt;p&gt;Webdriver driver = new ChromeDriver(); System.setProperty("webdriver.chrome.driver", "Path of the chrome driver");&lt;/p&gt;

&lt;p&gt;Maximize the browser for a clear picture of test cases being executed using the following command.&lt;/p&gt;

&lt;p&gt;driver.manage.window.maximize();&lt;/p&gt;

&lt;p&gt;Step 2: Navigate to salesforce.com&lt;/p&gt;

&lt;p&gt;driver.get("&lt;a href="https://login.salesforce.com%22"&gt;https://login.salesforce.com"&lt;/a&gt;);&lt;/p&gt;

&lt;p&gt;It will appear as seen below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FB12ejZk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2ALDQgMcSi1s2Neun3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FB12ejZk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2ALDQgMcSi1s2Neun3.png" alt="" width="512" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 3: Enter Username and Password using the following command&lt;/p&gt;

&lt;p&gt;driver.findElement(By.xpath("//input[&lt;a class="mentioned-user" href="https://dev.to/id"&gt;@id&lt;/a&gt;='username']")).sendKeys(""); driver.findElement(By.xpath("//input[&lt;a class="mentioned-user" href="https://dev.to/id"&gt;@id&lt;/a&gt;=password]")).sendKeys("");&lt;/p&gt;

&lt;p&gt;Step 4: Click the Login Button using the following command&lt;/p&gt;

&lt;p&gt;driver.findElement(By.xpath("//input[@class='button r4 wide primary']")).click();&lt;/p&gt;

&lt;p&gt;Since you may encounter some issues while loading the page, add a wait to let the page load completely&lt;/p&gt;

&lt;p&gt;driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);&lt;/p&gt;

&lt;p&gt;This will lead to the Home Page as seen below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jBQuu3Yr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2A8GPYA_qvbs6tbefi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jBQuu3Yr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2A8GPYA_qvbs6tbefi.png" alt="" width="512" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 5: Find the Quick Find Search Field in the UI on the home screen and enter object in the Quick Find Search field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yJMUrF-f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AZBg2stRVdytzDf-c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yJMUrF-f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AZBg2stRVdytzDf-c.png" alt="" width="512" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;driver.findElement(By.xpath("//input[@class='quickfindInput version2 ']")).sendKeys("object");&lt;/p&gt;

&lt;p&gt;Step 6: Click appearing after entering object in the Quick Find Box&lt;/p&gt;

&lt;p&gt;driver.findElement(By.xpath("//a[&lt;a class="mentioned-user" href="https://dev.to/id"&gt;@id&lt;/a&gt;='CustomObjects_font']")).click();&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5r17NnLq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AVRpOZiJiGSbdtJ0j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5r17NnLq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AVRpOZiJiGSbdtJ0j.png" alt="" width="512" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 7: Click on the " Create New Objects Link "&lt;/p&gt;

&lt;p&gt;driver.findElement(By.xpath("//a[@value='New Custom Object']")).click();&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jo3zGX8t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2ADxZSg7Qxzf9niruO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jo3zGX8t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2ADxZSg7Qxzf9niruO.png" alt="" width="512" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 8: Choose the Label text box to input the object name and do the same for Plural Label&lt;/p&gt;

&lt;p&gt;driver.findElement(By.xpath("//input[&lt;a class="mentioned-user" href="https://dev.to/id"&gt;@id&lt;/a&gt;='MasterLabel']")).sendKeys("abc"); driver.findElement(By.xpath("//input[&lt;a class="mentioned-user" href="https://dev.to/id"&gt;@id&lt;/a&gt;=PluralLabel']")).sendKeys("abc's");&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YY3bPFC3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AzYwdMTkxiDqLUWIO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YY3bPFC3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AzYwdMTkxiDqLUWIO.png" alt="" width="512" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 9: Click on Save button at the end of the page&lt;/p&gt;

&lt;p&gt;driver.findElement(By.xpath("//a[@value=' Save ']")).click();&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z2VIHAeE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AYAsicU2-DZObFTot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z2VIHAeE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2AYAsicU2-DZObFTot.png" alt="" width="512" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Custom Object created can be seen below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m6nyMbPz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2Aa1HS_nf2Ya7By3ML.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m6nyMbPz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1024/0%2Aa1HS_nf2Ya7By3ML.png" alt="" width="512" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Best Practices of Salesforce Testing
&lt;/h1&gt;

&lt;p&gt;Now that it is identified what to test, where to test, and how to test in terms of testing salesforce applications, let's discuss some best practices for testing salesforce effectively.&lt;/p&gt;

&lt;p&gt;A proper test strategy and test plan are absolutely critical for Salesforce testing as it encompasses many components and business processes. A clear view of the high-level objectives, the stakeholders present, the different phases of testing involved, and the tools to be used must all be determined in this phase.&lt;/p&gt;

&lt;p&gt;Salesforce offers a variety of Sandbox options for isolated Salesforce Sandbox testing. To satisfactorily test business-critical functions, all systems should be properly integrated in the sandbox so that proper integration testing can be performed in real-time scenarios like on production.&lt;/p&gt;

&lt;p&gt;Read More: &lt;a href="https://www.browserstack.com/guide/how-to-ensure-test-coverage"&gt;How do you ensure maximum test coverage?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Automating critical and often repeated business processes, like a checkout or order fulfillment flow, in Salesforce saves lots of time when testing. Salesforce supports several types of API endpoints that can be used for automation testing. API endpoints can be automated by using tools like Postman, REST-Assured &amp;amp; Soap UI.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Navigating through frames&lt;/li&gt;
&lt;li&gt;  Executing against dynamic content&lt;/li&gt;
&lt;li&gt;  Handling tables&lt;/li&gt;
&lt;li&gt;  Object dependency&lt;/li&gt;
&lt;li&gt;  Heavy DOM structure and shadow DOMs&lt;/li&gt;
&lt;li&gt;  Driving data&lt;/li&gt;
&lt;li&gt;  Reusability&lt;/li&gt;
&lt;li&gt;  Long steps for end-to-end testing&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Common Challenges in Salesforce Testing
&lt;/h1&gt;

&lt;p&gt;Some of the core challenges that QA professionals face during Salesforce automation are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  SF Classic supports the &lt;a href="https://www.browserstack.com/test-in-internet-explorer"&gt;latest IE 11 version&lt;/a&gt;, but it is not supported by Lightning.&lt;/li&gt;
&lt;li&gt;  SF Lightning does not support private browsing in the latest version of firefox but classic does&lt;/li&gt;
&lt;li&gt;  Certain features in Salesforce, like the Standard mail merge or extended mail merge (Salesforce Classic only Feature), and some client applications like Connect Offline work only on the Internet Explorer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is best to choose the correct &lt;a href="https://www.browserstack.com/guide/best-test-automation-frameworks"&gt;test automation framework&lt;/a&gt; that provides solutions to these challenges. However, an even bigger challenge is the issue of successful &lt;a href="https://www.browserstack.com/live"&gt;cross browser testing&lt;/a&gt; in Salesforce regardless of whether it is done manually or through an automation framework.&lt;/p&gt;

&lt;p&gt;Since Salesforce customers have an option of using the Classic or the Lightning platform features, there is an amount of variation involved in performing some tasks based on the platform of choice as well as the browser being used. For example:&lt;/p&gt;

&lt;p&gt;Since all organizations cannot allocate funds for infrastructure to test have a massive test environment for Salesforce Testing, cloud-based platforms like Browserstack to implement cross-browser testing for all your Salesforce testing needs&lt;/p&gt;

&lt;p&gt;Salesforce is a leading CRM, equipped with a large feature set, that can be customized and reconfigured to suit an organization's business needs. However, only focusing on developing SF modules is not enough. Salesforce testing is critical in ensuring customer satisfaction and delivering processes that not only work seamlessly but also enable the maximum leverage of Salesforce's unique capabilities to ensure customer success.&lt;/p&gt;

</description>
      <category>java</category>
      <category>salesforce</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Parallel Testing: The Essential Guide</title>
      <dc:creator>Sourojit Das</dc:creator>
      <pubDate>Fri, 15 Apr 2022 17:14:33 +0000</pubDate>
      <link>https://dev.to/sourojitdas/parallel-testing-the-essential-guide-44f1</link>
      <guid>https://dev.to/sourojitdas/parallel-testing-the-essential-guide-44f1</guid>
      <description>&lt;h2&gt;
  
  
  Parallel Testing: The Essential Guide
&lt;/h2&gt;

&lt;p&gt;With more and more software engineering teams gravitating to the CI/CD model, the onus to reduce the time to market by delivering a foolproof product is increasing. And in QA, the only way to ensure minimal impact from bugs is to test the code as soon as possible and fail fast.&lt;/p&gt;

&lt;p&gt;For QA teams, it means &lt;a href="https://www.browserstack.com/guide/how-to-ensure-test-coverage"&gt;increasing test coverage&lt;/a&gt; through automation, but often the sheer number of tests required to be performed along with the paucity of time to test the features means that classical sequential automated tests are not enough. Parallel testing allows teams to perform automated tests against several configurations at the same time to scale downtime and budget constraints while allowing for increased test coverage and ensuring quality.&lt;/p&gt;

&lt;h1&gt;
  
  
  Parallel Testing: What it is and How it works
&lt;/h1&gt;

&lt;p&gt;Parallel Testing is a process to leverage automation testing capabilities by allowing the execution of the same tests simultaneously in multiple environments, real device combinations, and browser configurations. The overarching goal of parallel testing is to reduce time and resource constraints. Unlike distributed testing, where the different test components running in a distributed manner interact with each other, the parallel test approach is free from any such interaction.&lt;/p&gt;

&lt;p&gt;To better understand how parallel testing helps boost standard automation testing capabilities, let us take a simple example --- an automated functional test of a signup form. To perform this test for 45 different Browser/OS configurations, with each test taking an average time of 2 minutes, then the total run time of tests would be 90 mins or 1.5 hrs when run successfully in sequence.&lt;/p&gt;

&lt;p&gt;Now imagine, when running 3 parallel tests simultaneously, the total execution time would have come down to 30 mins.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A9slQK-r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2AAnWMFXz4-Q8DfFmr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9slQK-r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2AAnWMFXz4-Q8DfFmr.png" alt="" width="512" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And for 6 parallels, it would be even further reduced to 15 mins- a far cry from what was expected before.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zQZvYEzB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2AnWqIg0sVmCaW3Z8s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zQZvYEzB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2AnWqIg0sVmCaW3Z8s.png" alt="" width="512" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Considering this scenario to be one of the most basic &lt;a href="https://www.browserstack.com/guide/functional-testing"&gt;functional tests&lt;/a&gt; that are automated, it boggles the mind how parallelization of tests can shave valuable minutes and hours from the most cumbersome of test suites.&lt;/p&gt;

&lt;p&gt;The number of parallels required to optimize test times depends on the following key factors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The current number of browsers (and/or) Devices on which the scenario needs to be tested&lt;/li&gt;
&lt;li&gt;  Number of parallel tests currently being run ( we will keep this as 1 if only sequential tests are being run)&lt;/li&gt;
&lt;li&gt;  Current Build Time&lt;/li&gt;
&lt;li&gt;  The desired number of browsers (and/or) Devices on which the scenario needs to be tested, and&lt;/li&gt;
&lt;li&gt;  Desired Build Time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more complex scenarios involving a shift in any of these parameters, it is best to use a &lt;a href="https://www.browserstack.com/automate/parallel-calculator"&gt;Parallel Test Calculator&lt;/a&gt; to understand the number of parallel sessions required to achieve test coverage and build execution time goals.&lt;/p&gt;

&lt;h1&gt;
  
  
  When to perform Parallel Testing
&lt;/h1&gt;

&lt;p&gt;Now that we have some inkling of how parallel testing works and how it can optimize test execution time frames let's have a look at certain scenarios where parallel test execution is ideal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  In case the software engineering team is uncertain about the functionality of an application across devices and configurations, especially in regression-like scenarios with an updated version of an app.&lt;/li&gt;
&lt;li&gt;  In a case where legacy data is imported from an older system to a newer one, Parallel tests can be immensely helpful to check if everything has been moved across seamlessly using an automated regression test suite.&lt;/li&gt;
&lt;li&gt;  For cases of &lt;a href="https://www.browserstack.com/automate"&gt;automated browser testing&lt;/a&gt;, when an app needs to be tested across different combinations of browsers, OS, and devices.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  How to approach parallel test creation
&lt;/h1&gt;

&lt;p&gt;A common way to perform parallel testing is to create a suite of projects to &lt;a href="https://www.browserstack.com/guide/cross-browser-compatibility-testing-beyond-chrome"&gt;test browser compatibility&lt;/a&gt; and then a master project to test the aforementioned set of projects. Upon set up, it is time to create a set of Entry and Exit Criteria.&lt;/p&gt;

&lt;p&gt;For Entry Criteria, we must define those checkboxes that must be ticked off before test execution starts, for e.g.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Set up a suitable test environment, for instance, &lt;a href="https://www.browserstack.com/guide/testng-framework-with-selenium-automation"&gt;Selenium with TestNG&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  Define the pre-conditions and &lt;a href="https://www.browserstack.com/guide/how-to-create-test-scenarios"&gt;test scenarios&lt;/a&gt; for the automated browser test process&lt;/li&gt;
&lt;li&gt;  Migrate any new and legacy data required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exit level criteria can focus more on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Understanding the difference in terms of test suite execution impact&lt;/li&gt;
&lt;li&gt;  Measuring the output of a new system as compared to a legacy system (&lt;em&gt;if applicable&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Parallel Testing using TestNG and Selenium
&lt;/h1&gt;

&lt;p&gt;TestNG is a Java-based testing framework that helps to organize tests in a structured manner and enhances the maintainability and readability of test scripts. The large feature set of TestNG allows for the easy configuration of parallel tests. The auto-defined XML file in the TestNG framework allows testers to set the parallel attributes to methods/tests/classes by leveraging the allowance for multithreading in Java. This file can help determine the number of threads desired for &lt;a href="https://www.browserstack.com/guide/parallel-testing-with-selenium"&gt;parallel test execution&lt;/a&gt;.&lt;/p&gt;



&lt;p&gt;The parallel attribute can be extended to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Methods: To run methods in separate threads&lt;/li&gt;
&lt;li&gt;  Tests: To run all methods sharing the same tag in the same thread&lt;/li&gt;
&lt;li&gt;  Classes: to run all methods belonging to a class in a single thread&lt;/li&gt;
&lt;li&gt;  Instances: to run all methods in the same instance in the same thread&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whereas the thread count attribute can help define the number of threads the tester wishes to create when executing the tests in parallel.&lt;/p&gt;

&lt;p&gt;The below code snippet helps to demonstrate parallel test execution for opening the &lt;a href="https://www.browserstack.com/"&gt;BrowserStack homepage&lt;/a&gt; using two methods. One of the methods performs this action on Google Chrome, whereas the other does so on the Firefox browser.&lt;/p&gt;

&lt;p&gt;import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.edge.EdgeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.ie.InternetExplorerDriver; import org.testng.annotations.Test; public class ParallelTestWithMultiThread { WebDriver driver; &lt;a class="mentioned-user" href="https://dev.to/test"&gt;@test&lt;/a&gt;() public void testOnChromeWithBrowserStackUrl() { System.setProperty("webdriver.chrome.driver", ".\Driver\chromedriver.exe"); driver=new ChromeDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.get("&lt;a href="https://www.browserstack.com/%22"&gt;https://www.browserstack.com/"&lt;/a&gt;); driver.manage().window().maximize(); System.out.println("this is the test related to chrome browserstack homepage"+ " " +Thread.currentThread().getId()); } &lt;a class="mentioned-user" href="https://dev.to/test"&gt;@test&lt;/a&gt;() public void testOnChromeWithBrowserStackSignUp() { System.setProperty("webdriver.gecko.driver", ".\Driver\geckodriver.exe"); driver=new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.get("&lt;a href="https://www.browserstack.com/users/sign_up%22"&gt;https://www.browserstack.com/users/sign_up"&lt;/a&gt;); driver.manage().window().maximize(); driver.findElement(By.id("user_full_name")).sendKeys(""); driver.findElement(By.id("user_email_login")).sendKeys(""); driver.findElement(By.id("user_password")).sendKeys(""); System.out.println("this is the test related to chrome browserstack login"+ " " +Thread.currentThread().getId()); } @AfterClass public void close() { driver.quit(); } }&lt;/p&gt;

&lt;p&gt;The TestNG XML file below helps to set up the parallel attribute as well as the thread count for the task.&lt;/p&gt;

&lt;p&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &amp;lt;!DOCTYPE suite SYSTEM "&lt;a href="https://testng.org/testng-1.0.dtd%22%3E"&gt;https://testng.org/testng-1.0.dtd"&amp;gt;&lt;/a&gt;       &amp;lt;!-- Test --&amp;gt;  &amp;lt;!-- Suite --&amp;gt;&lt;/p&gt;

&lt;p&gt;Once we are done with the execution, the TestNG report will look something like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s2V7yQ6b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2AU_00grhZchqb4Qpn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s2V7yQ6b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2AU_00grhZchqb4Qpn.png" alt="" width="512" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A clear sign of the time savings obtained from parallelization can be seen below, in the real-time result, where we can see that parallel test execution is quicker by almost 1.5 times than serialized test execution&lt;/p&gt;

&lt;h1&gt;
  
  
  Running MBUnit tests in Parallel on Browserstack Automate
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.browserstack.com/automate?utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=Search-Brand-Tier2-EMEA-CL&amp;amp;utm_adgroup=Automate&amp;amp;utm_keyword=browserstack%20automate&amp;amp;utm_matchtype=e&amp;amp;gclid=Cj0KCQjw8_qRBhCXARIsAE2AtRbwc2dijXYc_4EAFVoaWZ2tNI37UXWgq4Khs0clbIANa7d8pAEYs_AaAnQdEALw_wcB"&gt;BrowserStack Automate&lt;/a&gt; can enable users to leverage the power of MBUnit to run tests across various browser, device, and OS configurations in parallel.&lt;/p&gt;

&lt;p&gt;For test execution, the steps are as below -&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Clone the mbunit-browserstack repo on GitHub git clone &lt;a href="https://github.com/browserstack/mbunit-browserstack.git"&gt;https://github.com/browserstack/mbunit-browserstack.git&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  Open MBUnit-BrowserStack.sln in Visual Studio\
Configure the credentials required and the details of the browsers/devices for parallel testing in the App.config file within the mbunit-browserstack/MBUnit-BrowserStack/ directory&lt;/li&gt;
&lt;li&gt;  Understand the ROI from automation and get buy-in from the stakeholders&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;                                     &lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;  Now the tests are ready to run in parallel on BrowserStack using the following simple steps:&lt;/li&gt;
&lt;li&gt;  Building the solution in Visual Studio&lt;/li&gt;
&lt;li&gt;  Executing the tests with the fixture parallel from Test Explorer.&lt;/li&gt;
&lt;li&gt;  Other capabilities can be added under the environments option as described below:&lt;/li&gt;
&lt;li&gt;         &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Advantages and Limitations of Parallel Testing
&lt;/h1&gt;

&lt;p&gt;Now that it is discussed when and how to run parallel tests, let us look at some of its advantages and limitations:&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of Parallel Testing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Speed: As we have demonstrated both theoretically and in practice, sequential automated test execution is time-consuming. Parallel tests can speed up the process significantly as the same test is being run against different configurations at the same time.&lt;/li&gt;
&lt;li&gt;  Cost Efficiency: Creating, maintaining, and keeping &lt;a href="https://www.browserstack.com/guide/what-is-test-environment"&gt;test environments&lt;/a&gt; active need time and effort. However, these overheads are hardly a headache in parallel testing, and the required test environment can be leased when required and updated as per demands. Also, cloud-based test grids allow test execution at high concurrency, reducing the overall cost per test.&lt;/li&gt;
&lt;li&gt;  Optimization of CI/CD Processes: The effectiveness of a CI/CD pipeline is determined by its total run time. With feedback loops being of the utmost importance in CI/CD, the sooner the team has a result, the sooner they can apply the fix, refactor, and reiterate the process. Large test suites can be broken up into smaller independent jobs and run in parallel to quickly obtain results, thus improving the performance of the pipeline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j__2eN4_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2A-m2FkfjIboXkAREc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j__2eN4_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/640/0%2A-m2FkfjIboXkAREc.png" alt="" width="512" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations of Parallel Testing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  For the parallel testing of different modules, we need to create independent modules. Also, modules with dependencies cannot be included in the parallel approach.&lt;/li&gt;
&lt;li&gt;  For parallelization, one needs to have a detailed understanding of the product and its flow for better results. Even though parallelization can help in &lt;a href="https://www.browserstack.com/guide/cross-browser-compatibility-testing-beyond-chrome"&gt;cross browser compatibility testing&lt;/a&gt;, its coverage of multiple browsers is restricted until and unless it is accompanied by distributed testing where the setup of multiple machines and browsers is provided.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Best Practices of Parallel Testing
&lt;/h1&gt;

&lt;p&gt;None of the advantages of parallel testing will be of any use; however if we fail to follow best practices-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Make autonomous tests: One test should not depend on the outcome of another, as parallel tests may not occur in any defined order.&lt;/li&gt;
&lt;li&gt;  Test one feature at a time: The major advantage of parallel testing is modularization. A test that encompasses many features defeats the purpose of failing fast which is absolutely key to CI/CD pipeline performance.&lt;/li&gt;
&lt;li&gt;  Avoid the use of static objects: Using static objects may prevent another test, running in parallel, from manipulating it.&lt;/li&gt;
&lt;li&gt;  Resetting the test data: Cross-contamination of data needs to be prevented by modular creation, usage, and tearing down of test data to ensure the test leaves the system the same way it entered it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  In a nutshell
&lt;/h1&gt;

&lt;p&gt;Owing to the need for having access to multiple platforms and browsers to run tests in parallel, the cost of compatibility testing with parallel testing increases. Also, we may come to a point where access to all browsers and versions may not be possible. BrowserStack provides access to numerous platforms and browsers with their corresponding versions on the cloud. One can run &lt;a href="https://www.browserstack.com/automate"&gt;automated parallel tests&lt;/a&gt; and use multiple browsers and versions.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>automation</category>
      <category>selenium</category>
      <category>java</category>
    </item>
    <item>
      <title>How to move from Manual to Automation Testing</title>
      <dc:creator>Sourojit Das</dc:creator>
      <pubDate>Thu, 24 Mar 2022 16:49:03 +0000</pubDate>
      <link>https://dev.to/sourojitdas/how-to-move-from-manual-to-automation-testing-1ij3</link>
      <guid>https://dev.to/sourojitdas/how-to-move-from-manual-to-automation-testing-1ij3</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JkPvXwJu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/10560/1%2A4NIn58IsNizKnG6mXSnxPg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JkPvXwJu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/10560/1%2A4NIn58IsNizKnG6mXSnxPg.jpeg" alt="" width="880" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With software requirements changing at lightning speed in an agile environment, more and more organizations look to inculcate more atomic development cycles for accelerating their Time To Market (TTM). A &lt;a href="https://digital.ai/press-releases/15th-state-of-agile-report-shows-notable-rise-in-agile-adoption-across-the"&gt;2021 study&lt;/a&gt; by digital.ai has discovered that &lt;strong&gt;86% of software development teams have adopted agile, up from 37%, a year ago.&lt;/strong&gt; This shift to more agile software development methods has led to a simultaneous demand for more efficient means of software testing during the software is developed. Companies run the risk of suboptimal software delivery due to costly manual test case maintenance cycles as well as the lack of visibility these legacy processes bring to the table.&lt;/p&gt;

&lt;p&gt;A &lt;a href="https://www.statista.com/statistics/627648/worldwide-software-developer-survey-project-failure/"&gt;Statista study&lt;/a&gt; highlights that 32% of all Software projects fail due to the simple lack of time to test the product thoroughly.&lt;/p&gt;

&lt;p&gt;Testing timelines are cut shorter, for quicker software delivery. It is mostly because the consumers have different options to explore, as a result of which, the user expectations have increased. Hence, it is important to deliver a high-quality software release with new features every few weeks for customer engagement and retention.&lt;/p&gt;

&lt;p&gt;The heavy workload upon software testers working against the clock to perform high volumes of repetitive manual tests is a major concern. Additionally, customer dissatisfaction arising from uncaught defects during production and costly downtime resulting from sub optimally tested features are driving factors too. These reasons have cumulatively led to the increasing adoption of automation testing in the industry.&lt;/p&gt;

&lt;p&gt;In such conditions, traditional manual testing is often seen as being unnecessarily time-consuming and prone to human errors. Thereby, it is essential to transform from manual to automation test practices for keeping up with global trends and business demands.&lt;/p&gt;

&lt;p&gt;Before discussing the details of transitioning from manual to automation testing, let’s have a brief overview of both these methods along with some scenarios where they are optimal.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Manual Testing
&lt;/h2&gt;

&lt;p&gt;Traditional &lt;a href="https://www.browserstack.com/guide/manual-testing-tutorial"&gt;manual testing&lt;/a&gt; requires testers to manually investigate defects in software by adhering to a predefined test plan comprising a number of test cases. The testers take it upon themselves to analyze the behavior of the app and check if the functionality is synchronous with the expected behavior.&lt;/p&gt;

&lt;p&gt;Testers identify bugs and report them to developers who fix them after replicating the errant behavior. This can become challenging for a test lead/manager especially when the timelines are shorter.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use Manual Testing
&lt;/h2&gt;

&lt;p&gt;Manual testing is useful when the QA process requires cognitive and behavioral abilities beyond that of software. It is recommended to use Manual testing in situations like:&lt;/p&gt;

&lt;p&gt;Also, for scenarios where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The testers need a quick turnaround on a particular scenario with a clear intent. Since automation tests take time to set up, it might be faster to test one-off scenarios manually. However, scenarios that require a repetition with different inputs would be better off being tested through automation testing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The projects are short-term with a small number of feature tests. Since automation is time-consuming to set up, small projects can be tested manually.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;End-user usability is of importance, as no machine is accurate enough to decide the satisfactoriness of a user journey without an actual user testing it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these test scenarios can now be expanded into a set of positive and negative test cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Automation Testing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.browserstack.com/guide/automation-testing-tutorial"&gt;Automation testing&lt;/a&gt; primarily uses frameworks to execute test cases. Each framework is unique to an extent and is powered by scripts adhering to the rules of the framework in question. These frameworks have components like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Function libraries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test Data Sources&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Object Details&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Other reusable modules&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These frameworks can be classified as&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Linear&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data-Driven&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keyword-Driven&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Agile&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When to use Automation Testing
&lt;/h2&gt;

&lt;p&gt;Automation tests work best when we need to run a large volume of repetitive tests with differing inputs. For example, Data-Driven testing of a large number of regression tests. As in this case, the functionality has essentially remained the same, it will not require much manual oversight.&lt;/p&gt;

&lt;p&gt;Also, when human resources are better utilized in other tasks which require greater cognitive effort, it is better to run automated tests. &lt;a href="https://www.browserstack.com/guide/parallel-testing-with-selenium"&gt;Parallel testing&lt;/a&gt; offers a great avenue to run a large volume of tests without compromising test accuracy.&lt;/p&gt;

&lt;p&gt;Thus, to recap, we have identified a couple of important caveats before focussing on the transition from manual to automation testing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Not everything can be automated&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manual testing cannot be done away with completely (at least in some areas).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to switch from Manual to Automation Testing
&lt;/h2&gt;

&lt;p&gt;As a quality assurance leader, once you have identified the need to automate a portion of your existing test portfolio, it is important to consider the steps required to achieve your goal. Here are a few simple guidelines to help make that decision:&lt;/p&gt;

&lt;h3&gt;
  
  
  Understand the ROI from automation and get buy-in from the stakeholders
&lt;/h3&gt;

&lt;p&gt;Change is inevitable, however, necessary. But for change to be accepted, the stakeholders need to be convinced of the ROI arising from that change. The Return on Investment from automation can be best described in terms of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Increased speed of test coverage:&lt;/strong&gt; Automated tests can work wonders for repetitive test cases and help minimize the cognitive load for data-driven regression testing allowing your team to work in a more agile way across sprints.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduced cost:&lt;/strong&gt; Though some may claim that the initial cost of setting up an automated test framework is higher than standard manual testing, one will only reap increasing dividends by setting up the infrastructure. Studies have shown that the costs of test automation reaches a positive balance after the third test cycle, and this can be speeded up even further in an agile scenario.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JaIn_DpG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/0%2A8GdAUMW97UB0AVMQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JaIn_DpG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/0%2A8GdAUMW97UB0AVMQ.png" alt="" width="512" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Providing a baseline for Continuous Integration and DevOps:&lt;/strong&gt; An automation test suite is a foundation for transitioning into a scalable &lt;a href="https://www.browserstack.com/guide/ci-cd-vs-agile-vs-devops"&gt;CI/CD and DevOps&lt;/a&gt; model. Continuous Testing is the execution of automated tests at regular intervals made to correspond to code changes. These tests are conducted as part of the software delivery pipeline and provide faster feedback on changes to the repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Increased Accuracy and Productivity:&lt;/strong&gt; Test automation provides faster test coverage with data-driven accuracy and frees up resources to divert their attention to more critical tasks thereby increasing overall productivity as well.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Decide what to Automate
&lt;/h3&gt;

&lt;p&gt;The key decision in any &lt;a href="https://www.browserstack.com/guide/continuous-testing-in-devops"&gt;test-automation strategy&lt;/a&gt; is to select which test suites to automate. Some of the tests which are most suitable for automation are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Regression Test Suites:&lt;/strong&gt; These are usually voluminous, require the same set of variables to be used as input and are usually run several times during the development&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data-Driven Test Suites:&lt;/strong&gt; Even a lot of functional tests are data-driven and need to be tested with numerous divergent data sets to test a variety of positive and negative scenarios.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance Testing Suites:&lt;/strong&gt; Tests to monitor system performance under different circumstances can be automated to reduce test times.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Select the Right Framework(s) for the project
&lt;/h3&gt;

&lt;p&gt;Selecting the right framework is essential for streamlined testing. Test frameworks are often licensed and need time to set up. Moreover, it is important the team is well-versed with the tool for delivering accurate results. Selecting the right framework depends upon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Nature of the Software:&lt;/strong&gt; Understand the primary audience and thus the main runtime system for your software. If it is desktop-based, a tool like &lt;a href="https://www.selenium.dev/"&gt;Selenium &lt;/a&gt;is preferable. If it is mobile-first then &lt;a href="https://appium.io/"&gt;Appium &lt;/a&gt;can be considered, and so on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Programmer Skillset:&lt;/strong&gt; It is vital to choose frameworks that are compatible with your team’s forte and experience. Some popular languages for test automation frameworks are Java, JavaScript, Ruby, C#, etc. It is best to select a framework that supports the programming language preferred for practice by the team.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt; Automation is sometimes expensive. Depending on your need you may choose a licensed framework like QTP or an open-source framework like Selenium Webdriver.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Set bite-sized targets and a rapid learning curve
&lt;/h3&gt;

&lt;p&gt;Test automation is often touted as a silver bullet in the world of QA. However, the journey from a manual to an automated test suite might not be smooth. It’s best to start with small goals. Automate the test suite that is most used in regression testing. Isolate any common errors, and iteratively expand the scope and complexity of the automation to increase test coverage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Aim for thorough visibility and continuous testing
&lt;/h3&gt;

&lt;p&gt;Continuous Integration (CI), Continuous Deployment (CD), and Continuous Testing (CT) are all key components in Agile. While CI enables developers to merge code changes to the repository on a daily basis, CT is required to ensure that those changes work as expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a4s_OLtK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/0%2A9NkduXzx5MqBIZac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a4s_OLtK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/0%2A9NkduXzx5MqBIZac.png" alt="" width="512" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Have a well-defined lifecycle for your automation test suite
&lt;/h3&gt;

&lt;p&gt;Once the automation suite has been set up (sometimes at the cost of considerable time, effort and finances) it is vital to ensure there is a clear roadmap to implement and maintain the same. Some &lt;a href="https://www.browserstack.com/guide/reasons-for-automation-failure"&gt;common pitfalls of test automation&lt;/a&gt; include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;lack of specific goals,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;inadequately testable applications,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;low visibility of the automation ROI across the organization.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is important to make automation a core part of the STLC (Software Testing LifeCycle) to ensure its success. Also, following &lt;a href="https://www.browserstack.com/guide/10-test-automation-best-practices"&gt;automation best practices&lt;/a&gt; ensures that the transition is seamless and the rewards are commensurate to the efforts.&lt;/p&gt;

&lt;p&gt;Test automation has become indispensable for organizations seeking to make the most out of Agile Software Development practices and incorporate CI/CD and DevOps into their development plans. Though manual testing still retains a niche, a transition to automation can result in speedier test coverage with enhanced accuracy. Performing tests on Real Devices would help generate more accurate results.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>agile</category>
      <category>automationtesting</category>
    </item>
    <item>
      <title>How to create Selenium test cases</title>
      <dc:creator>Sourojit Das</dc:creator>
      <pubDate>Thu, 03 Feb 2022 11:40:30 +0000</pubDate>
      <link>https://dev.to/sourojitdas/how-to-create-selenium-test-cases-1np</link>
      <guid>https://dev.to/sourojitdas/how-to-create-selenium-test-cases-1np</guid>
      <description>&lt;p&gt;&lt;a href="https://www.selenium.dev/"&gt;Selenium &lt;/a&gt;has established itself as one of the most popular automation testing frameworks within the software engineering community. Comprising a suite of tools – IDE, RC, WebDriver, and Grid – Selenium has quickly established itself as a market leader in the test automation sector. &lt;/p&gt;

&lt;p&gt;Selenium capitalized on the inadequacies of previously used frameworks like HP QTP, and Mercury’s Astra QuickTest which compelled users to write scripts in VBScript and were primarily intended for desktop-based tests. Its support of a variety of languages like Java, Python, C#, Perl, Ruby, .net and PHP, has made it popular with individual testers and companies like Netflix, Google, HubSpot, and Fitbit among others.&lt;/p&gt;

&lt;p&gt;The core idea behind Jason Higgins launching Selenium back in 2004 was to remove the need for users to perform repetitive manual testing. This article will focus on how to write test cases in Selenium in a way that allows us to leverage its ability to provide maximum, accurate test coverage in a limited time. &lt;/p&gt;

&lt;p&gt;Let’s start by giving a brief outline of how test cases are written, and then proceed to create a &lt;a href="https://www.browserstack.com/guide/selenium-webdriver-tutorial"&gt;Selenium WebDriver test script&lt;/a&gt; from a manual test case using the JAVA programming language.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to extract test cases from Business Requirements
&lt;/h2&gt;

&lt;p&gt;All software must undergo End to End testing before being released. This method tests the application workflow from beginning to end by replicating different user scenarios. The first step in performing an End to End test is to analyze business requirements. A tester considers the different user personas involved, aims for maximum test coverage, and considers using automation to achieve it. &lt;/p&gt;

&lt;p&gt;The usual process starts with the tester studying the business requirements to isolate a set of user stories. These user stories help represent the business requirements – what a person using the product would like to be able to do. This, in turn, helps cater to a series of user personas, and create a number of test scenarios. &lt;/p&gt;

&lt;p&gt;Once the test scenarios are framed, a set of industry-wide best practices are followed to frame these scenarios into a sequence of actions that can help verify a particular functionality. This is what is known as a Test Case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing a test case using Selenium
&lt;/h2&gt;

&lt;p&gt;To write the first test case, consider a sample business requirement – Ensure secure user entry to a BrowserStack Account.&lt;/p&gt;

&lt;p&gt;Given that a user trying to gain entry to a BrowserStack Account could either be a new or an existing user, test scenarios can be framed around both the Register and Login pages.&lt;/p&gt;

&lt;p&gt;For the purposes of this article, consider the user persona to be that of a registered user. &lt;/p&gt;

&lt;p&gt;On viewing encounter the BrowserStack Login page, ask the following questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can a user login with the correct user ID and password?&lt;/li&gt;
&lt;li&gt;What happens when an invalid email id and invalid password are entered into the form?&lt;/li&gt;
&lt;li&gt;What happens when a valid email id and invalid password are entered into the form?&lt;/li&gt;
&lt;li&gt;What happens when an invalid email id and valid password are entered into the form?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All of these test scenarios can now be expanded into a set of positive and negative test cases.&lt;/p&gt;

&lt;p&gt;Positive test cases ensure that the ‘happy-path’ or expected user journey when the correct data is entered, works as intended. Negative test cases focus on invalid actions, often by replicating the input of invalid data or seeking access to an invalid component.&lt;/p&gt;

&lt;p&gt;In this case, the first test scenario can lead to the development of a positive test case, whereas the rest lead to negative test cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of a Test Case in Selenium
&lt;/h2&gt;

&lt;p&gt;Let’s build a &lt;a href="https://www.browserstack.com/guide/how-to-create-selenium-test-cases"&gt;Selenium test case&lt;/a&gt; example based on the first test scenario. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test Scenario&lt;/strong&gt;: To authenticate a successful user login on Browserstack.com&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test Steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The user navigates to the BrowserStack sign-in page.&lt;/li&gt;
&lt;li&gt;In the ’email’ field, the user enters their registered email address.&lt;/li&gt;
&lt;li&gt;The user enters the registered password.&lt;/li&gt;
&lt;li&gt;The user clicks ‘Sign Me In.’&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites :&lt;/strong&gt; A registered email ID with a unique username and password.&lt;br&gt;
&lt;strong&gt;Browser:&lt;/strong&gt; Chrome v 86. &lt;br&gt;
&lt;strong&gt;Test Data: ** Legitimate username and password.&lt;br&gt;
**Expected/Intended Results:&lt;/strong&gt; Once username and password are entered, the web page redirects to the user’s dashboard.&lt;br&gt;
&lt;strong&gt;Actual Results: ** As Expected&lt;br&gt;
**Test Status:&lt;/strong&gt; Pass/Fail: Pass&lt;/p&gt;

&lt;h2&gt;
  
  
  Converting a Selenium Test Case to a Test Script
&lt;/h2&gt;

&lt;p&gt;After configuring the system to execute test scripts, let’s convert the manual test case into an executable test script. For that, carry out the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a Selenium WebDriver instance.&lt;/li&gt;
&lt;li&gt;Perform browser optimization if necessary.&lt;/li&gt;
&lt;li&gt;Write a sequence of commands to execute the test steps.&lt;/li&gt;
&lt;li&gt;Validate the actions performed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let’s explore each step in detail:&lt;/p&gt;

&lt;p&gt;Step 1 – To launch the website in a browser of your choosing, set the system properties to the path of the required driver for the browser. Since this example uses Google Chrome, it should be set to the &lt;a href="https://www.browserstack.com/guide/run-selenium-tests-using-selenium-chromedriver"&gt;ChromeDriver&lt;/a&gt;. The code for the same is as follows –&lt;/p&gt;

&lt;p&gt;`Webdriver driver = new ChromeDriver();&lt;/p&gt;

&lt;p&gt;System.setProperty("webdriver.chrome.driver", "Path of the chrome driver");`&lt;/p&gt;

&lt;p&gt;Step 2 – Proceed to maximize the browser for a clear picture of test cases being executed using the following command. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;driver.manage.window.maximize();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 3 – Once the basic tasks are complete, execute each step of the manual test case articulated in the previous section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implement test steps
&lt;/h2&gt;

&lt;p&gt;Step 1 – The user navigates to Gmail.com&lt;/p&gt;

&lt;p&gt;&lt;code&gt;driver.get("https://www.browserstack.com/users/sign_in");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 2 – In the ’email’ field, the user enters their registered email address.&lt;/p&gt;

&lt;p&gt;To perform this step, locate the email field on the Google Sign In form, and enter the requisite data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wityeyp1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtyiidq0bhv4geof81d3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wityeyp1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtyiidq0bhv4geof81d3.png" alt="Image description" width="488" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use the ID locator in Chrome DevTools to identify the necessary elements for the Email field, and store them in a webelement variable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EYHkt50x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yya7y8i8ov80eeh64wud.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EYHkt50x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yya7y8i8ov80eeh64wud.png" alt="Image description" width="880" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;`driver.findElement(By.id("user_email_login"));&lt;/p&gt;

&lt;p&gt;WebElement username=driver.findElement(By.id("user_email_login"));`&lt;/p&gt;

&lt;p&gt;Once the element has been located, perform the requisite action:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;username.sendKeys("abc@gmail.com");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 3 –  The user enters the registered password&lt;/p&gt;

&lt;p&gt;Repeat the same process for the password field as well&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DV5UFWvM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e1zasd0lhxq3ipuiq2z0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DV5UFWvM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e1zasd0lhxq3ipuiq2z0.png" alt="Image description" width="880" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;`driver.findElement(By.id("user_password"));&lt;/p&gt;

&lt;p&gt;WebElement password=driver.findElement(By.id("user_password"));&lt;/p&gt;

&lt;p&gt;password.sendKeys("your_password");` &lt;/p&gt;

&lt;p&gt;Step 4 – The user clicks ‘Sign In’&lt;/p&gt;

&lt;p&gt;Once the email and password web elements have been located and the actions have been performed, the tester can perform the final desired action. In this case, the user clicks ‘Sign In.’&lt;/p&gt;

&lt;p&gt;&lt;code&gt;login.click();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, validate the actions performed using assertions. Assertions help testers compare the expected and actual results of the actions performed. If these are in sync, the test case is said to have passed. Otherwise, the test case is considered to have failed.&lt;/p&gt;

&lt;p&gt;The assertion, in this case, is of the general form:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Assert.assertEquals(String actual, String expected);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
The String actual variable holds the post-login value, which is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;String actualUrl="https://live.browserstack.com/dashboard";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The method below can help get the expected URL:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;String expectedUrl= driver.getCurrentUrl();&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Thus, the final code will look something like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Assert.assertEquals(actualUrl, expectedUrl);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
If the test case passes, it will retrieve the same else will return as having failed.&lt;/p&gt;

&lt;p&gt;The final code will be as follows: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;import org.openqa.selenium.By;&lt;br&gt;
import org.openqa.selenium.WebDriver;&lt;br&gt;
import org.openqa.selenium.WebElement;&lt;br&gt;
import org.openqa.selenium.chrome.ChromeDriver;&lt;br&gt;
import org.testng.Assert;&lt;br&gt;
import org.testng.annotations.Test;&lt;br&gt;
public class LoginAutomation {&lt;br&gt;
@Test&lt;br&gt;
public void login() {&lt;br&gt;
System.setProperty("webdriver.chrome.driver", "path of driver");&lt;br&gt;
WebDriver driver=new ChromeDriver();&lt;br&gt;
driver.manage().window().maximize();&lt;br&gt;
driver.get("https://www.browserstack.com/users/sign_in");&lt;br&gt;
WebElement username=driver.findElement(By.id("user_email_Login"));&lt;br&gt;
WebElement password=driver.findElement(By.id("user_password"));&lt;br&gt;
WebElement login=driver.findElement(By.name("commit"));&lt;br&gt;
username.sendKeys("abc@gmail.com");&lt;br&gt;
password.sendKeys("your_password");&lt;br&gt;
login.click();&lt;br&gt;
String actualUrl="https://live.browserstack.com/dashboard";&lt;br&gt;
String expectedUrl= driver.getCurrentUrl();&lt;br&gt;
Assert.assertEquals(expectedUrl,actualUrl);&lt;br&gt;
}&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Select Test Cases for Selenium Automation
&lt;/h2&gt;

&lt;p&gt;Selenium and other test automation frameworks help reduce development cycle timeframes, avoid repetitive tasks and achieve 100% test coverage in a quick and efficient manner. But, to get the most out of Selenium tests, it is necessary to focus on some best practices when selecting test cases for automation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select test suites which offer the highest Return on Investment in terms of cost-saving, increasing efficiency, and improving test quality.&lt;/li&gt;
&lt;li&gt;Identify test cases on what they are meant to do. needing to be automated. Based on business goals and requirements, automate the following:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;a.Test cases to be executed with different data sets&lt;br&gt;
  b.Test cases to be executed on different environments&lt;br&gt;
  c.Test cases to be executed for different user types&lt;br&gt;
  d.Test cases that have multiple dependencies, etc &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consider the execution time and testing frequency of these test cases. If one or both of these parameters are high, then it is likely a test automation framework is required to write these test cases.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>selenium</category>
      <category>testing</category>
      <category>beginners</category>
      <category>java</category>
    </item>
  </channel>
</rss>
