Menu
  • Home
  • Services
    • Consulting Services
    • Support Services
    • Implementation Services
    • Customization Services
    • Integration Services
    • Product Development with Salesforce
  • Focus Areas
    • Managed Services
    • Customer Onboarding
    • Loan Origination System
    • Business Process Workflows
    • Buyer Journey Management
    • OptiSales for Field Force
    • Salesforce Integration Orchestration
    • Supporting Nonprofits
  • Case Studies
  • Blog
  • Careers
  • Contact

Software Testing Best Practices

CategoriesBlog / Salesforce Technology

Thinqloud Admin

April 5, 2019

Software testing is important for quality assurance. Best practices in software testing can provide high-end software at the end. In this blog I am sharing some of best practices in software testing from my personal experience.

1. Test Case Creation:

Once the requirements are approved and frozen tester need to start the test case creation
process. When development team is writing the code or development is in process, the
test case preparation is started in parallel and completed to avoid any hustle during the QA
execution. When writing the test cases proper information needs to be added in the test
cases sheet – TC_Id, Objective, Steps, Expected Result, Actual Result, Test Data, Status,
He/she need to cover the negative test cases, positive test cases, regression test cases and
smoke test cases.

2. Prepare regression test cases list:

Regression test cases are very important. Whenever there comes a new build of the
software, there is always a chance that the old functions of the software might be
impacted. You should have a regression test cases list prepared so as
to check the existing functionality is not obstructed.

3. Positive Testing and Negative Testing:

The positive test cases are created based on the requirements. Positive Testing is type of testing in which the testing is done to check the software is meeting the requirements through positive scenarios. Tester need to mention the correct/valid data for all the fields. Negative Testing is performed when you want to check the software for negative scenarios and to break the code . The tester needs to put some error values in the application to be tested. e.g wrong date formats, putting decimals, colons in number formats.

4. Performance Testing:

Performance testing is the process of determining the speed or effectiveness of a
computer, network, software program or device. This process can involve quantitative tests
done in a lab, such as measuring the response time or the number of MIPS (millions of
instructions per second) at which a system functions. And qualitative attributes like reliability, scalability and interoperability can also be evaluated. Generally performance testing is done in association with stress testing. The process can compare two or more devices or programs for the parameters like speed, data transfer rate, bandwidth, throughput, efficiency or reliability.

5. Test Case Preparation and Review:

The test case should contain all the steps of execute the test. It should be easily understood
by any person on test cases. Some best practices for test case creation are:

The test cases should be mapped with the requirements to create a better
understanding of the test case.

  • There should be a test case name, number, requirement and description of test case.
  • Log in information should always be written.
  • Write the test case type e.g. negative test case, positive test case.

6. User Acceptance Testing:

When the application is handed over to the client, entire documentation should be made
explaining the method of installation, any open defects.

Unit Test Mechanism in Salesforce

1. Single action

Here user need to test to verify that a single record produces the correct/ expected result.
So created the unit test data in your test class.

2. Bulk actions

User need to test not only for single record he/she need to test for bulk records as well,
may be invoked for 1 to 200 records.

3. Restricted user

Test whether a user with restricted access to the sObjects used in your code sees the
expected behavior. That is, whether they can run the code or receive error messages.

Always use RunAs for to check user access on sObjects.

4. Positive behavior

User need to test first for positive test cases it included filling the data correctly and it did
not go past limits.

5. Negative behavior

User must test for the negative test cases as well. If there is an amount field, then he/she
needs to test for negative amount. User must test for the negative case and verify that the
error messages are correctly produced as well as for the positive, within the limits case.

Testing Best Practices in Salesforce

1. Set up test data

  • Create the necessary data in test classes, so the tests do not have to rely on data in
    a particular organization.
  • Create all test data before calling the Test.startTest method.
  • Since tests don’t commit, you won’t need to delete any data.

Write comments stating not only what is supposed to be tested, but the assumptions the
tester made about the data, the expected outcome, and so on.
Test the classes in your application individually. Never test your entire application in a
single test.

Best Practices for Parallel Test Execution

Tests that are started from the Salesforce user interface (including the Developer Console)
run in parallel. Parallel test execution can speed up test run time. Sometimes, parallel test
execution results in data contention issues, and you can turn off parallel execution in those
cases. In particular, data contention issues and UNABLE_TO_LOCK_ROW errors might
occur in the following cases:

  • When tests update the same records at the same time. Updating the same records
    typically occurs when tests don’t create their own data and turn off data isolation to
    access the organization’s data.
  • When a deadlock occurs in tests that are running in parallel and that try to create
    records with duplicate index field values. A deadlock occurs when two running tests are
    waiting for each other to roll back data, which happens if two tests insert records with
    the same unique index field values in different orders.

Recent Posts

  • Thinqloud: Empowering Manufacturing with Salesforce Solutions
  • Thinqloud’s Salesforce Managed Services: Empowering Enterprises to Thrive in the Digital Age
  • Thinqloud’s Custom Loan Origination Solution on Salesforce: Empowering Lenders to Scale and Thrive
  • Thinqloud: Empowering BFSI with Salesforce Solutions
  • Thinqloud: Empowering Wealth Management Firms using Salesforce

Categories

  • Blog
  • Communities
  • Finance
  • General
  • Nonprofit
  • Sales
  • Salesforce Technology
  • Services

Archives

  • July 2024
  • April 2024
  • March 2024
  • January 2024
  • December 2023
  • September 2023
  • July 2023
  • June 2023
  • May 2023
  • November 2022
  • October 2022
  • February 2022
  • January 2021
  • October 2020
  • September 2020
  • August 2020
  • March 2020
  • February 2020
  • September 2019
  • April 2019
  • February 2019
  • November 2018
  • September 2018
  • August 2018
  • June 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • July 2017
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016

Services

  • Solution Development Services
  • Salesforce Implementation Services
  • Salesforce Support Services
  • Salesforce Customization Services
  • Salesforce Integration Services
  • Classic to Lightning Migration
  • Marketing and Sales Consulting Agency

Site Links

  • Home
  • Blog
  • Case Studies
  • Contact
  • Careers

© 2022 Thinqloud, All Rights Reserved.

  • Privacy