Software Testing – Methods

Continuing along with the theme of testing, I wanted to explore the various methods used for software testing. I found that there are a variety of approaches when it comes to software testing. Both static and dynamic testing work to improve the quality of the final software product.

  • Static Testing includes reviews, walk-throughs, or inspections of the software (or sections of it). It can include proofreading or using programming tools (i.e. text editors or compilers) to check the source code structure or syntax and data flow. Static testing revolves around verification.
  • Dynamic Testing is well, dynamic. The program is actually executed or run with a test case (or a set of test cases), and oftentimes in a debugger environment. It may also include testing just small pieces of the program before the entire program has been completed. Dynamic testing involves validation.

The ‘box approach’ includes the white-box and black-box testing methods:

  • White-Box testing
  • Black-box testing

Other testing methods include:

  • Visual testing
  • Grey-box testing

White-Box testing looks at testing internal structures (different from what the end user experiences). This is also known as clear box testing, glass box testing, transparent box testing and structural testing. It would be similar to testing nodes in a circuit (in-circuit testing). There are different techniques used in white-box testing – API testing, code coverage, fault injection, mutation testing, function coverage, and statement coverage. Perhaps one day, I will explore these individually and write in greater detail. My goal with this series was really to just learn the basics about some official methods of testing, which I had not even realized existed up to this point. My approach to testing started out haphazardly (does it work? why not? try this.) and I wanted to try to standardize my approach.

Black-box testing looks at examining the software functionality without knowing any of the internal workings of the software. Testers are only looking at what the software is supposed to do, but not how it functions internally. There are many different methods available, including: equivalence partitioning, boundary value analysis, all-pairs testing, state transition tables, decision table testing, fuzz testing, model-based testing, use case testing, exploratory testing and specification-based testing. Thank you Wikipedia. A tester need not possess any programming knowledge because they are only looking at the external functionality. However, because they are only looking at the external functions, it may be possible to skip over testing some parts of the program.

Specification-based testing, as mentioned above, looks at testing in alignment with the software requirements. One simple example would be testing the addition function on a calculator. By entering 2 + 2 (and knowing that the expected answer would be 4), you could verify that the program functions as expected.

Visual testing involves video recording or observing the testing process in order to witness the point where the software performs unexpectedly. This allows developers to see exactly what the tester did (what button was pushed, what browser, the timing of clicks, etc) in order to create the failure, and eliminates or lowers the need for developers to replicate the failure, saving time and allowing them to focus on a solution. I experienced this myself last week when I was unable to replicate a bug that had been reported. After a conference call and a ‘GoToMeeting’ (in order to share the computer screen), I was able to witness the timing involved with our testing staff and see the error that I had been unable to replicate. Her timing was described as ‘regular’ on the bug tracking record (clicking from field to field), whereas I would describe her timing as ‘extremely slow’ based on watching the screen as she clicked through fields. That made a big difference for me to be able to replicate the error, and ultimately find the cause and develop a solution or fix.

Gray-box testing (or Grey, depending on which side of the pond you are on) is something I work with pretty often right now, although I never knew an official name for it previously. It includes having some knowledge of the background functions and structure, particularly the supporting database. A tester could perform a test on the software at the user interface level and execute SQL queries before and after the test to verify that the appropriate change took place at the database level. This type of testing may help the tester to design more accurate tests.

My sources:
Wikipedia provides a large amount of information on software testing. And, did you know there is even an Association for Software Testing? Microsoft provides some great information too. There is also a great website dedicated to software testing – Software Testing Fundamentals.

Co-op 2 Highlights 8

This semester is speeding right along and here we are in week 8, which was really last week, so I’m a tad behind.  The website remodel for our sister organization is moving along and there was a meeting last week to review the proposed wireframes and layouts for the new design.  A volunteer has been working on this and has provided some excellent work.  The project group (includes board members, some staff, and volunteers) reviewed the proposed layouts and is using Cincinnati Hills Christian Academy’s website as a model or ‘best practice’ site.  The meeting included discussions and clarifications around font styles, images to be used, main website headers, links to partner websites, links to social media websites, and adding videos and testimonials throughout the site.  This group will meet again in March to finalize and approve the wireframes and design and then begin working on producing improved content for the site.  It’s really great to see this project moving forward some.

It is also interesting to note that you can have a really great website with great design elements, but if you don’t have decent content, it can really lower your overall first impression of an organization and adding more pictures or video does not necessarily make your website great.

Another topic that came up in this meeting last week had to do with 508 compliance.  This law applies to government sites and those affiliates that link to government sites, but it’s a good practice to incorporate when doing web development.  This web article is a great start to understanding what is and isn’t 508 compliance and the difference between being compliant and being accessible.  I also found this website, Section508.gov, a government website, that gives all the details about compliance and accessibility.

Section 508 Laws

In 1998, Congress amended the Rehabilitation Act of 1973 to require Federal agencies to make their electronic and information technology (EIT) accessible to people with disabilities. Inaccessible technology interferes with an ability to obtain and use information quickly and easily. Section 508 was enacted to eliminate barriers in information technology, open new opportunities for people with disabilities, and encourage development of technologies that will help achieve these goals. The law applies to all Federal agencies when they develop, procure, maintain, or use electronic and information technology. Under Section 508 (29 U.S.C. ‘794 d), agencies must give disabled employees and members of the public access to information that is comparable to access available to others. It is recommended that you review the laws and regulations listed below to further your understanding about Section 508 and how you can support implementation.

Very interesting stuff!  And definitely something to put in the web design toolbox.  This week also included more work on VARI, Vineyard Attendance Reporting Index, so I hope to highlight that a little more in my next post.

 

Co-op 2 Highlights 3

This past week I was able to help with downloading WordPress and setting up the basics of a website that will provide information for an upcoming conference hosted at my work.  It was great to be able to walk through each step:  downloading the WordPress file, setting up the site to run at our server, creating a database, creating log-in information for several people, and choosing an initial template.  I have previously used WordPress utilizing their hosting, mainly for this blog, so it was great to see how it could be used if you wanted to host it on your own server.

Additionally this week, I talked with our Associate Director of IT about a possible Capstone project to get his input and ideas on how the idea could be developed.  I wrote my proposal and submitted it to the Capstone instructor.  And, on Friday, I received the great news that he approved the project and thinks it would be great to include on my resume and even demonstrate it at an interview.  Wow!  Now, I just have to actually develop the project.  🙂

The overall project consists of creating a web application that would allow for the input and reporting of weekend attendance numbers.

I currently work at Vineyard Community Church in the Tri-County area, which has a weekend church attendance of about 5,000 people.  The current way for recording the attendance numbers for each service time (9am, 10:30am, and 11:59am on Sundays at Tri-County, plus additional times for each site) and each area (La Vina, Students, Children, Middletown, Eastgate, Uptown, Micro-churches) is to email numbers to the person in Finance.  This person then updates a giant Excel spreadsheet each week, usually on Tuesday, and then emails the spreadsheet out to various staff for review.  There is no visualization of any kind, just a flat grid of numbers and percentages showing Current Week, 4-Week, 13-Week, and 52-Week categories.

My goal would be to create a CRUD web application in C# using the MVC pattern to allow the Hospitality staff person to input directly into the web application (using an Access database that would be saved in SQL), creating a record for that particular weekend.  In addition to a data entry portal for capturing the attendance data closer to real-time (on Sunday, as opposed to updating the spreadsheet on Tuesday), I would like to add a reporting page containing several charts that would provide a better graphical presentation of the data.

The end goal, which could be a year or more down the line, would be to eventually export the SQL database into the Vine (the MySQL database) and use PHP code to run this web application through our proprietary graphical web interface for the Vine.  For now, it would be hosted on an IIS server and given a URL that anyone could access (with respect to the log-in and rights granted).

There is much, much more work to do here, from thinking through the different aspects of the application, thinking through the logic, visualizing the look, and figuring out who exactly will use it, to actually writing code and testing.  Whew, it’s a little overwhelming to think about, but I am sure that it will all come together if I just focus on one step at a time.

Co-op Highlights 15

This week at my co-op, I was able to sit in on a meeting regarding Google Apps for Enterprise. It was a brainstorming meeting to discover what topics would be good to cover in a staff training early next year (2014). What I found particularly interesting was looking at Google Apps from an end user perspective and figuring out what staff needs to know about Gmail, Calendar, Drive, Documents, Chat, Hangouts, etc to help staff work effectively and efficiently, fully utlilizing the tools available to us with Google Apps for Enterprise. Some of the topics we identified were things that we know most staff people aren’t using, but also things that would make work more efficient. It’s also a cost-effective solution for our organization, with email addresses and 25GB available for Drive and Documents costing about half (50%) of the current Office licenses per person.

Although this topic does not include any coding, it does help to cement the fact that computer programmers and web developers really need to work with the end user in mind. Any program or website needs to be user-friendly, that is, intuitive and easy for the end user to use. Components in a website or web application should be clearly labeled and easy to see for users. One example that I’ve noticed with Googe Mail (for our organization) recently is that there is a little grid of squares in the upper right corner – this is not labeled at all. But, when you click on it, the window opens and you can see links for Calendar, Documents, Drive, and other options. Now that I know it’s there, I don’t need it labeled, but when it first appeared, it would have been nice to have a hover balloon pop up to let you know what the little grid of squares is. This is just an example of how web developers could enhance their web pages to provide a great experience for the end users.

I also wanted to provide some information here on how to add Dynamic Data to an existing web application. This topic was one that I had to research earlier this week and it proved very interesting. I’m not sure that it would be applicable to my organization, but the research provided me some good basic knowledge, so that I can provide input to my organization if the topics arises.

It seems that the easiest way to add dynamic data to an existing web application is to create a dummy Dynamic Data web application and then copy the critical folders and files over to your pre-existing web application. You would then make some changes in different files to be able to utilize the Dynamic Data scaffolding. I found similar explanations at different websites, but this MSDN Microsoft website (http://msdn.microsoft.com/en-us/library/ee923692(VS.100).aspx) was the main source of my information. This website, http://blogs.msdn.com/b/scothu/archive/2008/06/24/how-to-add-dynamic-data-to-an-existing-web-application.aspx?Redirected=true, also contained some helpful information, but was very similar to the first information source. Additionally, this website, http://msdn.microsoft.com/en-us/library/cc837197(v=vs.90).aspx, provided similar information, but focused on adding Dynamic Data to a website, rather than a web application.

For this scenario, we have our web application called MyWebsite. We’ll want to create a new web application using Dynamic Data in Visual Studio – we’ll call this the DDWebsite.

In the MyWebsite, you’ll want to make sure that you have added the Data Model. This would be the model that represents the database (in this scenario, AdventureWorks). In Solution Explorer, right-click the project name and click Add. Click the Add ASP.NET folder and then click App_Data. Then, right-click the newly created App_Data folder and click Add Existing Item. At that point, enter the location for the AdventureWorks database file (.mdf) and click Add.

The Data Model will contain the classes representing the database tables and will help the Dynamic Data to interact with the database. You can use either a LINQ-to-SQL model or a ADO.NET Entity Framework model. You must choose and cannot use parts of each model. This example will use LINQ-to-SQL. Right click the project in Solution Explorer and click Add ASP.NET folder and click App_Code. In the Installed Templates in the left-side pane, click Data. In the center pane, you would click LINQ-to-SQL Class. Then, in the Name box, enter the name AdventureWorksLT.dbml and click Add. The Object Relational Designer should now be displayed.

In the Object Relational Designer, click the Server Explorer link. Under Server Explorer and under Data Connections, expand the AdventureWorks.mdf node and expand the Tables node. Select all of the tables and drag them into the Object Relational Designer window. Then close the Server Explorer and click Save All in the File menu.

Additionally, you’ll want to register the data model context to enable Dynamic Date to access the information in the database. In Solution Explorer, right click to Add New Item and select Global Application Class (Global.asax file). If the MyWebsite already contains the Global.asax file, you would just add the following code to it:

<%@ Import Namespace=”System.ComponentModel.DataAnnotations” %>
<%@ Import Namespace=”System.Web.Routing” %>
<%@ Import Namespace=”System.Web.DynamicData” %>
And in the Application_Start method, add the following:

void Application_Start(object sender, EventArgs e)
{
// Create an instance of the data model.
MetaModel DefaultModel = new MetaModel();
// Register the data model.
DefaultModel.RegisterContext(typeof(
AdventureWorksLTDataContext),
new ContextConfiguration() { ScaffoldAllTables = false });
}

At this time, you’ll want to create the routes. Routes are URL patterns, rather than actual URLs (to specific pages). In the Application_Start method, add the following:

void Application_Start(object sender, EventArgs e)
{
// Register the data model.
DefaultModel.RegisterContext(typeof(
AdventureWorksLTDataContext),
new ContextConfiguration() { ScaffoldAllTables = false });

// Create the routes.
RouteTable.Routes.Add(new
DynamicDataRoute(“{table}/{action}.aspx”){
Constraints = new RouteValueDictionary(new {
action = “List|Details|Edit|Insert” }),
Model = DefaultModel});
}

At this point, you’ll want to close your project (MyWebsite) and create a new project, which will be the DDWebsite, the Dynamic Data website where you’ll get the Dynamic Data scaffolding files and folders to copy into your MyWebsite. To create this Dynamic Data website, click File, New, and Web Site. Under Installed Templates, select C# and Dynamic Data LINQ to SQL Web Site in the center pane and select the location where you’ll be saving the website and name it.

Additionally, you’ll want to add the scaffolding elements to your existing website (MyWebsite) to enable users to create, read, update, and delete (CRUD) items in the tables. In Windows Explorer, open your Dynamic Data website (DDWebsite), copy the DynamicData folder, then right click the project name (of the existing website, MyWebsite) in the Solution Explorer and Paste. You’ll want to do this for the Site.css and Site.master files also (copy those files from DDWebsite to MyWebsite).