Thinqloud AdminSalesforce Technology

Software Testing Best Practices

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.
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.
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.
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.
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.
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.
When the application is handed over to the client, entire documentation should be made explaining the method of installation, any open defects.
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.
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.
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.
User need to test first for positive test cases it included filling the data correctly and it did not go past limits.
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.
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:
