Testing is a process in which the application is tested from different angles in order to −
The objective of testing is not to point the developer’s mistake but to facilitate tools and aiming at improving the quality to judge the health of the application at a given time.
Testing should be planned in prior. This calls for defining the objective of testing, knowing the scope of test cases, making the list of business needs and being familiar of the liabilities includes in the various stages of the project.
Testing is described as a range of features to be validated on a application or system. Below are the list of the test approaches which re commonly used −
Unit testing − This is generally performed by the developers themselves. The main purpose of unit testing is to check whether a unit of code works as expected or not.
Usability testing − Developers may generally does not keep in mind that they are developing an application for the end users who usually do not have awareness of the system. Usability testing tests for the advantages and disadvantages of the product/application.
Functional/Acceptance testing −Usability testing merely tests whether a system or application is usable or not where as functional testing validates that every specified functionality is implemented.
Load and performance testing − This is performed to understand whether the system can handle the specified load or not and performance tests to be conducted. This will result in changes in optimizing SQL queries, hardware etc.
Regression testing − It is done to make sure that the successive releases have not resulted in breaking of previous functionalities.
Reliability and resilience testing − Reliability testing is performed to validate the system with the breakdown of one or more components.
Photoblog applications always use unit testing to test the following −
unittest is rooted in JUnit, a Java unit test package which was developed by Kent Beck and Erich Gamma. Unit tests simply return defined data. Mock objects can be defined. These objects permits testing against an interface of our design without need to depend on the whole application. They also facilitate a way to run tests in isolation mode including with other tests.
Let us define a dummy class in the below way −
The illustration for the code is as follows −
Take this as an example for running a test case −
The result for executing the test case will be as shown below −
Once the application/sysytem functionalities begin taking shape according to the requirements, a set of functional testing can verify the application's rightness as per the specification. However, the test need to be automated for good performance which will require the use of third-party services such as Selenium.
CherryPy facilitates helper class like pre-defined functions to make simple the writing of functional tests.
In order to detect performance bottlenecks in the application that are not permitting it from attaining a certain level of performance, one have to perform load and performance testing.
This section will not describe in detail how to perform a performance or load test as it is out of its the FunkLoad package.
The very fundamental example of FunkLoad is as shown below −
Here is a detailed illustration of the above code −
The test case should be taken from the FunkLoad TestCase class so that the FunkLoad can perform its internal job of recording what is happening during the test.
The name of class is very important as FunkLoad will see for a file based on the class name.
The test cases which are designed will have direct access to the configuration files. Post() and Get() methods are simply called across the server to get the output.
cherryPy Related Interview Questions
|Python Interview Questions||PHP Interview Questions|
|MVC Framework Interview Questions||Node.js Interview Questions|
|Framework7 Interview Questions||Dynamic HTML Interview Questions|
|Java collections framework Interview Questions||Microsoft Solutions Framework (MSF) Interview Questions|
|Unittest Framework Interview Questions||wxPython Interview Questions|
|MongoDB Interview Questions||Spring MVC Framework Interview Questions|
|Python Automation Testing Interview Questions||Web API Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.