Sunday, December 18, 2016

V-Model Testing (WEEK 12)

The meaning of V-Model is Verification and Validation model. This model has the shape of V, the V-shape model is a path of executions which is followed in a logical order. Each phase must be completed before the next phase begins.When we have test a product must be planned in parallel with the corresponding phase in V-Model. First is very important to understand the Verification and Validation techniques before we learn about V-Model. Verification testing technique is done without executing any code and Validation testing technique is done by executing the code, Verification is a static analysis technique, Validation is a dynamic analysis technique. Both techniques are par of the V-Model. There are 7 phases that take place in V-Model. Here I'm listing the seven phases of V-Model: Requirement Specification, Preliminary Design, Detailed Design, Coding, Unit Testing, Integration Testing and System Testing. We usually apply V-Model for small to medium sized projects where requirements are clearly defined and fixed. 

This design shows the sequential path of execution process of V-Model.

In this paragraph I'm covering the pros and cons of V-Model. Some of the pros are: Development and progress is very organized. This model works well for smaller and medium sized projects. Another positive factor is easy to manage as each phase of this model. Some of the cons of V-Model are : V-Model doesn't work for big and complex projects. The V-Model is not suitable if the requirements are not compatible.

To learn more about V-Model Testing please visit the website below.

Citation
http://www.softwaretestinghelp.com/what-is-stlc-v-model/

Sunday, December 11, 2016

Four main functional tests to ensure software quality (WEEK 11)

These post is about a collection of four most recommend tests that a developer must have knowledge. According to info-Tech report there are four functional tests that can ensure software quality. The six functional tests are unit test, regression test, system integration, tests  and acceptance test. 

To ensure every line of code executes correctly is recommender to use Unit Testing, Unit Testing is the process of testing each unit of code  in a single component. One unit is the smallest part in a software, one unit can be a single program or function.  

To ensure every function produces its expected outcome developers have to use Functional Testing. Functional testing indicates concerns about the correct decision of functional requirements. Functional testing is like a black box testing which don't require any knowledge of the underlying implementation.

To ensure that all of the functions combine to deliver the desired business results developers have to use System testing. This type of testing executes end to end functional tests that can cross software units, in order to help become fully aware of the goals of assure that components deliver the desired business results. 

To ensure new changes did not adversely affect other parts of the system developers should use Regression testing. Regression  testing is used to ensure code modifications that have not accidentally introduced bugs into the system. When using Regression  testing is recommended to include plans from the original unit and system tests phases which can show that existing functionality behaves as planed. 

I wrote in my previous blogs posts about these four of these functional tests i really recommend you to read my previous posts because there you can find dip details about unit testing and etc.


Citation

http://searchsoftwarequality.techtarget.com/report/Six-functional-tests-to-ensure-software-quality













Mutation Testing (WEEK 10)

The term mutation in software testing stand for modifying the test code and can check the existing test and detect or reject the change mutes. Mutation in Java is an additional class with a single modification compared to the original code, for example it can be the change of a logical operator  in a if section :

if( a && b ) {...} => if( a || b ) {...}

When detecting or rejecting a modification by the existing test in marked as killing a mutant. If we have a perfect test code no class mutant can survive. Testing with mutant testing can be very expensive so that is one reason why is better to write a perfect code. There are tools to create mutants and run all the tests against each of the mutants automatically. The mutation creation is based on mutation operators that are which can show typical programming errors.

This picture shows a report which list all the mutant killed by ruing the mutation testing.
Here are some of the benefits when we apply the mutation testing:
Can show all new errors to the developer
Can detect hidden defects in the structure of code
Can increase customer satisfaction index because the product can be less buggy.
Maintaining and debugging the product can be easier.

Mutation testing is very useful way to find errors and fix them and it can speedup the proses of finding bugs in the code.


Citation
http://www.codeaffine.com/2015/10/05/what-the-heck-is-mutation-testing/

Tuesday, November 29, 2016

Apache jMeter testing (WEEK 9)

Apache jMeter is a open source software desktop application and is designed with java. This application is built to measure and test performance of websites. First the jMeter was designed to test web applications but has expanded to other types of test functions. We can use Aphach jMeter to test performance on dynamic and static resources like web dynamic applications. By using jMeter we can stimulate a heavy load on group of servers or  network or objects to test its strength. Also jMeter can be used recode fast test plan from browsers, native applications and it can be used to build and perform debugging. 

Here I'm listing some features of Apache JMeter: 
Ability to load and performance test many different applications, server, protocol types:
  • Web - HTTP, HTTPS (Java, NodeJS, PHP, ASP.NET)
  • Java Objects
  • LDAP
  • SOAP / REST Webservices
  • FTP
  • Database via JDBC
  • Native commands or shell scripts
  • TCP
JMeter is very flexible to create test plan without going through the GUI, we can a test script with pure java. There are two important classes StandardJMeterEngine and HashTree. The first class is the main class which configures the Test Plan and executes it, the second class is the collection that holds the test plan elements which is required to run the test. If you want to learn more visit this website which explain the steps of testing with JMeter https://www.blazemeter.com/blog/5-ways-launch-jmeter-test-without-using-jmeter-gui

Monday, November 14, 2016

Levels of testing (Week 8)

There are different levels in a testing  process. Levels of testing include different methodologies which can be used during the process of software testing. There are two main levels of testing : functional testing and non-functional testing. One of my previews posts talks about black-box testing, functional testing is a type of black-box testing which is based on the specifications of the software that has to be tested. The software can be tested by providing input and then the results are examined in order to conform to the functionality which it was meant for. Functional testing of a software is conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. 

Functional testing includes five steps : 

Step 1 The determination of the functionality that the intended application is intended to perform.

Step 2 The creation of test data based on the specifications of the application.

Step 3 The output based on the test data and the specifications of the application.

Step 4 The writing of test scenarios and the execution of test cases.

Step 5 The comparison of actual and expected results based on the executed test cases.

In order to have an effective testing process all the above steps have to be followed and applied to the testing policies of every organization for this reason it will make sure that the organization maintains the strictest of standards when it comes to software quality. This part is about testing an application from its non-functional attributes. Non-functional testing includes testing a software from the requirements which are nonfunctional.  Performance, Security, User interface are some requirements examples of non-functional testing. Performance testing is one important and mandatory testing type in terms of the following: Speed, Capacity, Stability and Scalability. Performance testing can be either qualitative or quantitative. Security testing includes testing a software in order to identify any gaps from security.


Security testing should ensure the below list of features: 

Confidentiality, Integrity, Authentication, Availability, Authorization, Non-repudiation, Software data is secure, Software is according to all security regulations, Input checking and validation, SQL insertion attacks, Injection flaws, Session management issues, Cross-site scripting attacks, Buffer overflows vulnerabilities and Directory traversal attacks.
The levels of testing are important because in order to meet the functional and technical specifications  we have to follow all the steps and features that I listed above. 

Citation
https://www.tutorialspoint.com/software_testing/software_testing_levels.htm

Saturday, November 5, 2016

Can test automation replace human testers (Week 7)

This article lists the pros and cons for test automation  and human testers.  This days the IT managers and directors are in dilemma because they have to decide what is better for their department to use for software testing the automated testing or the manual testing. Do they have to hire a team of software testers or would they be better using automated testing? These strategies have big difference. Both these strategies have pros and cons here are some:

Automated Testing

Pros: The main advantage of using automated testing is the speed, IT managers can use this strategy to test the code faster then manual testing and also they can re-use the automated testing tool many times that they need. Automated testing can be used ion different operating systems. It is very effective for build verification and testing.

Cons: A down side of automation testing is not helpful with UI testing, it can not be trusted all the time also it has high initial cost of tools.

Manual Testing

Pros: Manual Testing is the testing of software for bugs in the software system. Testers execute test cases without using any automation tools. Lets talk about some of the pros, companies that can't afford automated test tools can use testers to write and execute test cases, this strategy is flexible compared to automation testing.

Cons: Manual testing can be very slow compared to automation testing. The tester have to be engaged 100% with the software and has to know the structure of it. If the tester don't know the structure of the software can be a high chance of missing out on some bugs.

Citation
http://www.thinksys.com/can-test-automation-replace-human-testers.shtml

Sunday, October 30, 2016

Unit Testing with Mock Objects (Week 6)

This article is posted by IBM and explains how the Mock Object can be used. In this article we will find some of the benefits of using Mock Objects for writing Unit tests for objects that act as mediatorsUnit testing has become widely accepted for software development. When you write an object you must also provide an automated test class containing methods that put the object through its paces, calling its various public methods with various parameters and making sure that the values returned are appropriate.When we're dealing with simple data or service objects, writing unit tests is straightforward. However, many objects rely on other objects or layers of infrastructure. When it comes to testing these objects, it is often expensive, impractical, or inefficient to instantiate these collaborators. For example, to unit test an object that uses a database, it may be burdensome to install, configure, and seed a local copy of the database, run your tests, then tear the local database down again.A mock object conforms to the interface of the real object, but has just enough code to fool the tested object and track its behavior. For example, a database connection for a particular unit test might record the query while always returning the same hardwired result. As long as the class being tested behaves as expected, it won't notice the difference, and the unit test can check that the proper query was emitted.

Here are some of the common coding style for testing with mock objects:

  • Create instances of mock objects
  • Set state and expectations in the mock objects
  • Invoke domain code with mock objects as parameters
  • Verify consistency in the mock objects

Citation
https://www.ibm.com/developerworks/library/j-mocktest/