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/


Thursday, October 20, 2016

How can SQL help your testing abilities? (Week 5)

The reports that SQL can generate transforms raw information into useful data also can be used as a tool that can help to refine your testing abilities. The methods that SQL provide can help perfect the skills of programmers. The methods help to get correct results  when we testing back-end applications.SQL is a parent-child relationship schema that allows information to be accessible and allows to minimize discrepancies across data which create reliable output tables.The tables with columns and rows that build up the records of employment can help the End user have a interactive graphical Interface. The interactive graphical interface it can help the users to make changes. SQL is used in a variety of testing tools; the tools that are used mostly to select information that is relevant and can provide insight into the business practices. Some of the automation tools that is used to create a quality product are QTP and Selenium. QTP provides functional test automation for software applications and environments and Selenium is a free (open source) automated testing suite, Selenium is used to test web applications. Both tools use different languages QTP  run on Java and Selenium runs on VBscript. There are some global statements that are used from SQL one of the statements is the sorted procedure. The advantage of Sorted procedure is that it can minimize work and it can decrise the amount of time it requires for testing by preventing reniventing the wheel. SQL have more capabilities available, which makes it helpful tool when we have to verify data.If we use these methods we can get better testing results.

Citation
https://www.utest.com/articles/how-can-sql-help-your-testing-abilities

The Basic of Software Testing (Week 4)

This post is dedicated to the fundamentals of software testing. First is important  to learn and practice the basic of software testing techniques before you step into the advanced testings. In this article, I'm listing the eight most important basics of software testing that are very important to master before you move forward.
  1. Software Quality-Software quality is the degree of conformance to explicit or implicit requirements and expectations.
  2. Dimensions of Software Quality- There are so many dimensions, here I listing some of them: Accessibility, Compatibility, Concurrency, Efficiency, Functionality, Functionality, Installability, Localizability, Maintainability, Performance, Portability, Reliability, Scalability, Security, Testability, and Usability, there are more dimensions but this is the most useful dimensions to know before you step forward with software testing.
  3. Software Quality Assurance- Software Quality Assurance is a set of activities for ensuring quality in software engineering processes.
  4.  Software Quality Control- Software Quality Control is a set of activities for ensuring quality in software products.
  5. SQA and SQC Differences- SQA is process-focused and prevention-oriented but SQC is product-focused and detection-oriented. 
  6. Software Development Life Cycle-Software Development Life Cycle defines the steps/ stages/ phases in the building of software.
  7. Software Testing Life Testing- Software Testing Life Cycle (STLC) defines the steps/ stages/ phases in the testing of software. 
  8. Definition of Test- Merriam Webster defines Test as “a critical examination, observation, or evaluation”. 
These eight basic concepts are important to go more in depth because can help us to be beter software tester in the future.

Here you can read more about these concepts: Click Here

Citation
http://softwaretestingfundamentals.com/software-testing-basics/


Tuesday, October 18, 2016

Automated Combinatorial Testing for Software (Week3)

Based on NIST website evidence suggests that nearly all software errors are triggered by the interaction of one to six parameters.This article posted by National Institute of Standards and Technology is saying that if faults in  systems can be caused by a combination of n or fewer parameters, then testing all n-way combinations of parameters can provide high confidence that nearly all faults have been discovered. NIST is creating methods and tools to generate tests for n-ways combinations of parameter values. They are using combinatorial testing algorithms for designing arrays and automated model checking. This work will have applications in high assurance software, security and safety. This research project is interesting because NIST is creating new ways of testing. In order to apply combinatorial testing it is required to find set of test inputs that covers all t-way combinations of parameter values and to match up each set of inputs with the expected output, this way of testing is traditional and difficult problems but the cool thing is that these problems can be solved with the new algorithms on currently available hardware. Some of the elements for this project/program are fault localization,  integration into the development process, improved covering array algorithms and distribution of interaction faults. I think Automated Combinatorial Testing is a very interesting process to solve problems especially when we use new algorithms to solve problems.

Citation 

https://www.nist.gov/programs-projects/automated-combinatorial-testing-software-acts

Tuesday, October 11, 2016

Black-Box, Grey-Box, White-Box (Week 2)



10/11/2016

Three important concepts in software testing: black-box, grey-box and white box and manual tests methods.

When tester doesn't have access to the code and the code is executable this type of testing is called black-box testing. Here is a manual test method example, when we install an application into a device then we create the test case based on requirement and then execute the test in order to verify the expected required output.
When a tester has access to a partial source of code is called gray-box testing . An example of manual gray-box testing : When a tester manually input all parameters into SDK's API and then manually check the output for the expected required results.
When a tester has full access to all the source code is called white-box testing. An example of manual white-box testing : When a tester checks the compiler  error warning or use static code analysis tool , check for null dereference, context leak, and resource leak.
All the examples that I provided above can be part of our future career and are very important to know the difference between the Black-box, grey-box, and white-box.

Source
https://www.utest.com/articles/examples-of-black-box-grey-box-and-white-box-testing

Thursday, October 6, 2016

Reasons why we should love software testing (Week 1)


There are two good reasons to love software testing the first reason is we can learn quickly. To be a software tester we have to study the latest trends and understand what the customer are looking to test. In order to deliver a high-quality service to the customer, we have to do the studying of the code or the software that they want to test and the reason why. Every test case can be different from the previous tests so this is a strong reason to love software testing. We can learn from software testing new things and become better software developers. The second reason is that we can implement new ideas. Implementing new ideas is even more critical than studying new cases of software testing. The generation of new ideas, and being able to comprehend the big picture can be very challenging for every software developer but in the end, like I said above these different challenges can make us better developers, this are the two main reason why we should love software testing.


https://www.utest.com/articles/why-we-love-software-testing