Daily Archives: 10/07/2012

Automated tools streamline software test and certification

In this Product How-To design article, Jared Fry and Shan Bhattacharya of LDRA go into detail on how to use the company’s tool suite to analyze code to trace requirements, identify and fix standards violations, monitor code coverage, and rapidly and effectively bring reliable products to market.

As software becomes increasingly important in safety-critical medical, automotive, aviation, and industrial systems, the risks presented by coding errors have intensified from merely squandering time to endangering lives, destroying property, and costing millions of dollars. In response, a variety of standards such as IEC 62304 (medical), ISO 26262 (automotive), DO-178C (aviation), EN 50128 (railway) and IEC 61508 (industrial) have been developed to put the focus on code quality and risk mitigation to promote the development of robust, reliable, error-free software.

Requirements fulfillment and bug-free integration of collaborating systems are of paramount importance to the multipart development teams common with complex safety-, mission- and security-critical products. These teams require best-of-breed tools that automate code analysis and software testing.

The LDRA tool suite offers a comprehensive set of competencies from static and dynamic analysis to requirements traceability, unit testing, and verification. It automates all stages of the development process, helping vendors to verify their software from requirements right through the model, code, and tests, to verification. By focusing on the development process as well as accurate coding, LDRA helps clients ensure a sound process while identifying and eliminating errors early, dramatically reducing platform risk and cost of development.

Requirements Traceability
The types of standards discussed above break code development into a methodical, well-controlled process that starts with key elements like certification plans, verification plans, validation plans, and so forth. These documents typically establish objectives, or requirements, that specify the production of various assets and artifacts.

By assets, we mean items principally generated during the design phase, such as system requirements, software requirements, risk and safety documents, source code, etc. By artifacts, we mean items principally generated during the verification and validation of the design, such as test cases, code coverage reports, code analysis reports, etc. These assets and artifacts in turn need to be traced back to the requirements, both to satisfy those objectives and to provide the traceability necessary to confirm the process.

True requirements traceability is a multistep effort that involves linking system requirements to software requirements, software requirements to design requirements, then tying those design requirements to source code and to the associated test cases. Tracing requirements demonstrates compliance to standards, but more important, it guards against missing features and bloated software that includes unnecessary (“dead”) code and/or unnecessary complexity. Requirements traceability ensures that the final system does exactly what is specified—nothing more and nothing less.

Traditionally, traceability between requirements and downstream artifacts has been assumed to take place as a by-product of the development process. The reality is that all too often, explicit trace links are seldom recorded and even if requirements are referenced, they may not be traced in a formal manner that will prove useful at a later date. Whether or not the links are physically recorded and managed, they still exist, though, putting the establishment of a Requirements Traceability Matrix (RTM) at the heart of any project (Figure 1 below). That’s where automated tools can help, both in building and tracking the RTM.

source:http://www.eetimes.com/design/embedded/4389798/Automated-tools-streamline-software-test-and-certification

Did you like this? Share it:

5 Distinctive Software Testing Tools

Bangalore: Software Testing tools have not only simplified the testing process, but they have also ensured a product which is reliable and of a high quality. There’s a wide selection of testing tools available in the market that can be used for the various aspects of the testing process.
Based on the process the tools are used, they can be categorized as below:

1.    Source Code Testing Tools
This tool aims at debugging an application before it is distributed. It consists of statements which are created using a text editor which is then saved in a file.  The source code testing tool eliminates the need for testing at a later stage as it detects and reveals the errors in the early stage of development. Some of the well known tools in this category are the IBM AppScan Source Edition, Parasoft Test and the CxSuite.

2.    Functional Testing Tools
Functional Testing Tools aims at identifying the functions which the software is expected to perform. The tester feeds in the inputs such as clicks and key strokes and later verifies the output with the expected output. CitraTest, GUITAR and AberroTest are some of the famous functional testing tool.

3.    Performance Testing tools
Some websites crashes when they cannot withstand the stress load in the event when there are many users requesting the same page at the same time. Performance testing tools like Bug Timer, TestLoad and XtremeLoad ensures that the application can withstand stress.

4.    Database Testing Tools
Database form one of the most essential part in a system and testing it ensures a quality software apart from ensuring usefulness of the data. Jumpstart and SQL DB Validator are the popular Database Testing Tool.

5.    Bug Tracking Tools
Testers use this tool to track reported software bugs in their work. Bugzilla, DevTrack, QEngine, Squish are the popular bug tracking tools

source: http://qa.siliconindia.com/news/5-Distinctive-Software-Testing-Tools-nid-122013.html

Did you like this? Share it:

Database Unit Testing Made Easy with Visual Studio Team Systems

While brushing up on my knowledge of software testing concepts, I came across quite an amusing definition of testing; “To tell somebody that he is wrong is called criticism. To do so officially is called testing” . A programmer usually resents it when a tester finds a defect in his code. We programmers thoroughly unit test our code before handing it off to a tester, because we take pride in developing a bug free application. Some programming languages (C# , VB, ASP.NET) afford themselves to be unit testing easily, because the application is developed within Visual Studio and can readily leverage its unit testing framework.

Visual Studio allows you to create Database projects, and database developers have started embracing it since Visual Studio Team Systems 2008 Database Edition GDR. This offers a robust framework for database developers to identify bugs with their database objects (schemas, stored procedures, functions, etc) by unit testing their database (T-SQL) code, before handing it over to the tester.  Before we jump into the specifics of database unit testing with Visual Studio, the next couple of paragraphs warm us up to the topic by covering a few basic concepts of software testing.

Software testing, undoubtedly plays a important role in the life cycle of most IT Projects. The Goal of any type of software testing is to identify defects to be fixed, so that the product meets requirements and has a deterministic and predictable output. Depending on the testing method employed, testing can be implemented at any time in the development process. Different software development models will focus the test effort at different phases in the development process. Newer development models, such as Agile, often employ test driven development and place an increased portion of the testing in the hands of the developer, before it reaches a formal team of testers.

Software testing methods are traditionally divided into white and black-box testing. These two approaches are used to describe the point of view that a test engineer takes when designing test cases. Unit Testing falls under the category of  white box testing, where the  the tester has access to the internal data structures and algorithms, including the code that implements these. This is in contrast with the black-box testing method, which  treats the software as a “black box”—without any knowledge of internal implementation. A black box tester is usually not a programmer, and  aims to only test the functionality of software according to the applicable requirements. Since the black-box tester has no knowledge on the underlying code, he may find bugs that a programmer misses. However, the same principle can sometimes lead to writing inefficient or incomplete test cases.

Unit Testing is a key component of Test driven development (TDD). Unit Tests are usually written by Developers while they work on the code, to ensure that a specific  of piece of code (Function, Class, Stored procedure, etc) is working as expected. Unit Testing helps to identify defects in the earlier stages of the software development life cycle, where they are cheaper to fix. Unit Testing can prove especially challenging in the world of database development, because of the need for a consistent test environment.

Database Unit Tests are used to establish a baseline state for a database and then to verify any subsequent changes that you make to database objects.  The Unit Testing Framework in Visual Studio (starting with VSTS 2005) helps database developers create, manage and execute Unit Tests for a Database. The Microsoft.VisualStudio.TestTools.UnitTesting namespace supplies classes that provide unit testing support. This namespace contains many attributes that identify test information to the test engine regarding data sources, order of method execution, program management, agent/host information, and deployment data. It also contains custom unit testing exceptions.

You will need the Database Edition GDR of VSTS 2008 or the Ultimate (or Premium) Editions of VSTS 2010 to create, modify and run database unit tests. You can run database unit tests with Professional Edition on VSTS 2010, but cannot create or modify them. Before you can start running database unit tests in VSTS, you must first create a Database Project and then create a test project. The next step is to write sets of Transact-SQL tests that exercise your database objects. Executing these tests in your isolated development environment helps you to verify whether those objects are behaving correctly before you check them in to version control. As changes are made to the database schema, you can use these tests to verify whether the changes have broken existing functionality. A detailed step by step walk through for creating and running database unit tests can be found  here on MSDN .

In a typical database unit test, a Transact-SQL test script runs and returns an instance of the ExecutionResult class. The instance of this class contains a DataSet, the execution time, and the rows affected by the script. All of this information is collected during execution of the script. These results can be evaluated within the Transact-SQL script by using the RAISERROR function, or they can be evaluated by using test conditions. Visual Studio Premium provides a set of the following predefined test conditions for you to use;

  • Data Checksum
  • Empty Resultset
  • Execution Time
  • Expected Schema
  • Inconclusive
  • Not Empty Resultset
  • Row Count
  • Scalar Value

You can also create negative unit tests to verify expected failures in a stored procedure. A detailed description of the database unit test conditions can he found  here on MSDN .
Visual Studio lets you create test lists to organize unit tests into groups. Test lists are also used to;

  • Run multiple unit tests as a group
  • Run tests as a part of a Build
  • Enforce check-in policy

Visual Studio 11 (currently Beta) comes with a host of unit testing enhancements. Some of the new features include the Unit Test Explorer and Support to Third Party Test Frameworks. More details can be found here on  Peter Provost’s MSDN Blog post .
Visual Studio not only continues to offer a robust framework for implementing database projects, but also makes a compelling case to use it for unit testing database code. It helps us programmers get one step closer to developing a bug free application.
I am presenting a 60 minute session on this topic at the St.Louis Days of Dot Net Conference, Aug 2nd – 4th 2012, where I    will not only cover the basis of unit testing concepts and terminology, but also discuss how unit testing helps ensure and document the quality and accuracy of database deliverables. I will also will run through a demo of creating and running database unit tests using VSTS 2010 . I have spoken on the same topic in the past at the St.Louis SQL Server User Group meeting on June 12th 2012.

References:

  • Software Testing Principles, Terminology & Definitions – http://en.wikipedia.org/wiki/Software_testing

    Unit Testing Framework in Visual Studio -

    • http://msdn.microsoft.com/en-us/library/ms243147(v=vs.80).aspx
    • http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting(v=vs.80).aspx
  • Database Unit Testing with Visual Studio –
    • http://msdn.microsoft.com/en-us/library/dd172118.aspx
    • http://msdn.microsoft.com/en-us/library/aa833283.aspx
  • Unit Test Conditions in Database Unit Tests -    http://msdn.microsoft.com/en-us/library/aa833423
  • Test Lists – http://msdn.microsoft.com/en-us/library/ms182461.aspx
  • Visual Studio 11 (Beta) Unit Testing updates -    http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/08/what-    s-new-in-visual-studio-11-beta-unit-testing.aspx
  • Software  Testing Jokes-

       http://softwaretestingfundamentals.com/software-testing-jokes/

    source:http://sqlwithsanil.com/2012/07/08/database-unit-testing-made-easy-with-visual-studio-team-systems/

  • Did you like this? Share it:

    Crowdsource Testing

    What is Crowdsource Testing?
    Crowdsource testing is an emerging trend in software testing which exploits the benefits, effectiveness, and efficiency of crowdsourcing and the cloud platform. It differs from traditional testing methods in that the testing is carried out by a number of different testers from different places, and not by hired consultants and professionals. The software is put to test under diverse realistic platforms which makes it more reliable, cost-effective, fast, and bug-free.
    This method of testing is considered when the software is more user-centric: i.e., software whose success is determined by its user feedback and which has a diverse user space. It is frequently implemented with gaming, mobile applications, when experts who may be difficult to find in one place are required for specific testing, or when the company lacks the resources or time to carry out the testing internally. Crowdsourcing your software testing consists of delegating onto a number of internet users the task of testing your web or software project while in development to ensure that it contains no defects.
    Crowdsource testing companies provide the platform for the testing cycles. They then crowdsourse the Product to a community of testers, who register for testing the software voluntarily.
    Testers are paid per bug, depending on type of bug and its market price. The crowdsource testing team is usually in addition to the organization’s testing team, and not usually a replacement.
    Crowdsource testing vs Outsource testing
    The main difference is that, in crowdsource testing, testers may belong to different workplaces. In outsource testing, the testers are from the same company or workplace that is responsible for outsourcing. In crowdsource testing, people voluntarily test a software with the possibility of not being paid (if no bugs are discovered). Outsource testers always get paid for their work.

    Advantages of Crowdsource testing:

    • Real insights from the real world, not just made up test case results
    • Rapid feedback right away.
    • With crowdsourcing, testers automatically test your interactive project against a variety of platforms
    • It is cost effective, as the product company pays only for the valid bugs reported.
    • The pool of testers is diverse with variations in languages as well as locales. This helps in testing applications which are based on localization.
    • Testing done by hundreds of people at the same time. As there are large number of testers testing a software simultaneously, testing can be done quickly, giving more time to market. Time to test the software is comparably less.
    • Leads to better productivity.

    Disadvantages of Crowdsource testing:

    • Security and Confidentiality : When offering a project to a crowd for testing, it is exposed to a large number of internet users worldwide.
    • If the project is not released, a large number of users are able to access it fully and discover its secrets.
    • Inconsistent quality and increased workload : The users that compose your crowd of testers are from different backgrounds, speak different languages and possess different levels of experience.
    • They may be a number of poorly written bugs, duplicate bugs and erroneous bugs.

    Some Crowdsource testing Tools:

    • InnoCentive

    • TopCoder

    • Amazon Mechanical Turk

    • uTest

    • Passbrains

    • Bugfinders

    • TXTeagle

    source: http://www.softwaretestingdiary.com/2012/07/crowdsourced-testing.html

    Did you like this? Share it: