Search Your Subject This Blog

09 July 2019

Unit Test Time Teble 2019 SSA Gujarat

Unit Test Time Teble 2019 SSA Gujarat

UNIT TESTING is a level of software testing where individual units/ components of a software are tested. The purpose is to validate that each unit of the software performs as designed. A unit is the smallest testable part of any software. It usually has one or a few inputs and usually a single output. In procedural programming, a unit may be an individual program, function, procedure, etc. In object-oriented programming, the smallest unit is a method, which may belong to a base/ super class, abstract class or derived/ child class. (Some treat a module of an application as a unit. This is to be discouraged as there will probably be many individual units within that module.) Unit testing frameworks, drivers, stubs, and mock/ fake objects are used to assist in unit testing.

A mutual fund is a professionally managed investment fund that pools money from many investors to purchase securities. These investors may be retail or institutional in nature.Mutual funds have advantages and disadvantages compared to direct investing in individual securities.The primary advantages of mutual funds are that they provide economies of scale, a higher level of diversification, they provide liquidity, and they are managed by professional investors. On the negative side, investors in a mutual fund must pay various fees and expenses.

Primary structures of mutual funds include open-end funds, unit investment trusts, and closed-end funds. Exchange-traded funds (ETFs) are open-end funds or unit investment trusts that trade on an exchange. Some close- ended funds also resemble exchange traded funds as they are traded on stock exchanges to improve their liquidity. Mutual funds are also classified by their principal investments as money market funds, bond or fixed income funds, stock or equity funds, hybrid funds or other. Funds may also be categorized as index funds, which are passively managed funds that match the performance of an index, or actively managed funds. Hedge funds are not mutual funds; hedge funds cannot be sold to the general public as they require huge investments. They are more risky than mutual funds and are subject to different government regulations.

Unit Testing Method
It is performed by using the White Box Testing method.

When is it performed?
Unit Testing is the first level of software testing and is performed prior to Integration Testing.

Who performs it?
It is normally performed by software developers themselves or their peers. In rare cases, it may also be performed by independent software testers.

Unit Testing Benefits
  • Unit testing increases confidence in changing/ maintaining code. If good unit tests are written and if they are run every time any code is changed, we will be able to promptly catch any defects introduced due to the change. Also, if codes are already made less interdependent to make unit testing possible, the unintended impact of changes to any code is less.
  • Codes are more reusable. In order to make unit testing possible, codes need to be modular. This means that codes are easier to reuse.
  • Development is faster. How? If you do not have unit testing in place, you write your code and perform that fuzzy ‘developer test’ (You set some breakpoints, fire up the GUI, provide a few inputs that hopefully hit your code and hope that you are all set.) But, if you have unit testing in place, you write the test, write the code and run the test. Writing tests takes time but the time is compensated by the less amount of time it takes to run the tests; You need not fire up the GUI and provide all those inputs. And, of course, unit tests are more reliable than ‘developer tests’. Development is faster in the long run too. How? The effort required to find and fix defects found during unit testing is very less in comparison to the effort required to fix defects found during system testing or acceptance testing.
  • The cost of fixing a defect detected during unit testing is lesser in comparison to that of defects detected at higher levels. Compare the cost (time, effort, destruction, humiliation) of a defect detected during acceptance testing or when the software is live.
  • Debugging is easy. When a test fails, only the latest changes need to be debugged. With testing at higher levels, changes made over the span of several days/weeks/months need to be scanned.
  • Codes are more reliable. Why? I think there is no need to explain this to a sane person.

Unit Testing Tips
  • Find a tool/framework for your language.
  • Do not create test cases for everything. Instead, focus on the tests that impact the behavior of the system.
  • Isolate the development environment from the test environment.
  • Use test data that is close to that of production.
  • Before fixing a defect, write a test that exposes the defect. Why? First, you will later be able to catch the defect if you do not fix it properly. Second, your test suite is now more comprehensive. Third, you will most probably be too lazy to write the test after you have already fixed the defect.
  • Write test cases that are independent of each other. For example, if a class depends on a database, do not write a case that interacts with the database to test the class. Instead, create an abstract interface around that database connection and implement that interface with a mock object.
  • Aim at covering all paths through the unit. Pay particular attention to loop conditions.
  • Make sure you are using a version control system to keep track of your test scripts.
  • In addition to writing cases to verify the behavior, write cases to ensure the performance of the code.
  • Perform unit tests continuously and frequently.

Unit Test Time Teble 2019 SSA Gujarat

UNIT TESTING is a level of software testing where individual units/ components of a software are tested. The purpose is to validate that each unit of the software performs as designed. A unit is the smallest testable part of any software. It usually has one or a few inputs and usually a single output. In procedural programming, a unit may be an individual program, function, procedure, etc.
Unit Test Paper Click Here

Unit Test Time Teble 2019 SSA Gujarat
Download File Click Here


No comments:

Post a Comment