The Specifics of GIS Testing
Learn more about some of the specific requirements of Geographic Information Systems, as well as how Behavior-Driven Development plays a role in it.
Join the DZone community and get the full member experience.
Join For Free
What is BDD?
BDD is a language that enables you to define the behavior of a system without including details about how it was developed. All requirements under the BDD are treated as a customer behavior. It was developed by Dan North and his team during their research of the concept of how to perform test-driven development with less cost.
It is aimed to prevent the poor-quality codes caused by poor communication between non-technical business teams and technical teams.
In Figure 1, stories created by customers and business analysts represent whole behavior parts created by a quality assurance team and developers. These stories can also store as technical analysis documents. Developers use these documents and develop behaviors to represent stories and make them ready for testing.
Steps for BDD
Feature Content
The expected behavior of the code to be tested is written as plain text. These texts are prepared by business analysts, clients or QA teams. These texts can also be stored as analysis documents.
Step Definitions Content
Step definitions that will perform the test are written. The step definitions prepared by the developers corresponds to the atomic functions used in the story.
xxxxxxxxxx
@CuADoc(purpose = "Girilen boylam ve enlem koordinatlarına seçilen şekilde tıklar.(Virgülden sonra 3 basamak girilmelidir.) Örnek: 29.123"
, params = {"Boylam", "Enlem", "Mouse Tıkla Seçeneği: tek, çift"}, escapes = {"^", "(.*):P", " ", "$"}
)
@And("^Harita üzerinde boylam : \"(.*)\" ve enlem : \"(.*)\" noktasına \"(.*)\" tıkla$")
public void clickCoordinate(String boylam, String enlem, String clickOption) {
super.clickCoordinate(Double.valueOf(boylam), Double.valueOf(enlem), clickOption.equalsIgnoreCase("çift"));
}
Testing Code Content
xxxxxxxxxx
public void clickCoordinate(double boylam, double enlem, boolean isDouble) {
Map<String, Integer> xyMap = getXY(boylam, enlem, 6);
clickMouse(xyMap.get("x"), xyMap.get("y"), isDouble);
}
xxxxxxxxxx
private void clickMouse(int x, int y, boolean isDouble) {
Actions clicker = new Actions(driver);
if (isDouble) {
clicker.moveToElement(driver.findElement(canvasElement), x, y).doubleClick().build().perform();
} else {
clicker.moveToElement(driver.findElement(canvasElement), x, y).click().build().perform();
}
}
Running Tests
Run scenarios are written using Cucumber. The detailed image of the process is as follows.
Benefits of BDD in the Project Process
Under normal circumstances, a project management process proceeds as follows:
- Planning
- Design
- Development
- Test
- Release
- Maintenance
The problem in this method is communicating with the customer from the planning phase to the design phase. Since the customer cannot read code, there should be a business analyst who will act as an intermediary. BDD enables both the business analyst and customer to prepare and forward BDD scenarios to the developer. The change in Agile methodology is as follows.
- Planning
- Design
- Test
- Development
- Release
- Maintenance
With this change, the benefit of BDD is in creating BDD scenarios by using stories written by the analyst. Additionally, communicating with the customer becomes easier with BDD scenarios.
The Specifics of GIS Testing
Geographic Information System is widely used in multiple business domains, including environment, resources, public health, and crime. Along with the rapid development of spatial science and technology, vast spatial data are received every day, especially remote sensing data. It’s impossible to process these data by hand. In order to make full use of these data, it’s imperative to find more efficient ways to increase the scale. More importantly, except for the complicated spatial analysis in GIS modeling, there are usually complex simulations and calculations in various intricate applications. Although GIS is powerful in spatial visualizing and analysis, it is weak in advanced statistic and numeric computation. Improving this situation becomes another important problem in GIS to solve.
In comparison to other types of software products and applications, GIS solutions have their own set of specifics. A few of the key characteristics include:
Localization and mapping: The accuracy of geographic mapping is very important when it comes to the proper functioning of GIS software. Maps and localization functionalities are often specific to the app. Legends, route displaying and the specifics of the map such as a traditional map, a 3D map, augmented reality components, will also have to be taken into consideration.
Complexity: GIS software is often very complex. Testing across different platforms and environments (an array of devices and operating systems) will be essentials to ensure the same flawless experience regardless of the hardware being used.
Search capabilities: Many GIS apps also enable location-based searches. Users get to define their own filters or use their current location to carry out a relevant search. It’s important for the search to display adequate results that depend on the user’s location and can change accordingly.
Because of these specifics, the testing process has to involve a number of key steps. The most important ones include setting a strategic scope for the process, test planning and execution, and reporting of results followed by bug fixes and enhancements. Clear processes set from the start will establish the tone and guarantee the comprehensiveness of the approach, regardless of the software’s function and complexity.
There is not much GIS testing literature. As already mentioned, there aren’t standardized practices in the field and protocols to follow for successful completion of the task. Many organizations have poorly defined testing plans and some don’t even have a plan at all. Companies which are using GIS modeling in their application generally use more than one tool. For instance, Auto It and MATLAB are used together to implement a complete test automation for GIS.
Getting some awareness about the best practices in the world of GIS testing, however, is of paramount importance.
GIS apps are becoming indispensable for many industries – from agriculture to supply chain management, and even insurance. For companies operating within these domains, errors can cost thousands of dollars. This is why GIS testing has to be taken seriously, enabling the emergence of standardized, compromise-free outcomes.
To ensure the quality of GIS software, it’s critical to put emphasis on:
Data testing: The accuracy of the spatial data is the biggest strength and the most important asset of the application. This is why a large part of the testing process should focus on data. The review process should focus on the rules and the restrictions for the provision of data, the specific values, and the specifics of the geo-processing framework. Running scripts in a scheduled manner over a certain period of time will also be required to guarantee the thorough nature of the test.
Filter testing: Smart geo-data filters rank among the biggest strengths of GIS applications. This is another key area to focus your efforts on. No GIS software product displays all of the information stored in its database at once. Apply all kinds of filters (attribute and spatial ones) to test their effectiveness and ensure the accuracy of the data being retrieved.
Testing Should Be Based on the Type of GIS Software
While the guidelines presented above are quite general and applicable to most types of GIS applications, it’s also important to design specific models based on the type of software being tested.
GIS applications can be classified in a number of categories, each one with its complexities and specific features.
Desktop mapping and global positioning system (GPS) applications rank among the most popular possibilities. Desktop mapping software comes with a further set of sub-divisions – from systems that only fetch relevant data to products that enable data processing and analysis capabilities.
Computer-aided design (CAD) programs come next. This type of software provides capabilities for designing, drafting, and displaying geographical information. Obviously, CAD software is more complex than desktop mapping tools and the set of testing practices should reflect this fact.
Image processing, mobile GIS, routing GIS, spatial databases, photogrammetry solutions, and cloud-based service solutions also fall under the GIS umbrella. All of these systems are complex, and they require specific operation resources, databases, input types and tools that support geographic queries/visualization/analysis.
GIS functional capabilities can also be basic or advanced, depending on the type of software and its intended uses. Some basic GIS functional capabilities include the digitization of maps, keyboard entry of information, raster to vector conversions, data plotting, report generation, and web mapping. Advanced functionalities come in the form of generating complex graphs, spatial analysis, the measurement of an area, linear referencing, perspective views, scale changes, etc.
Further Reading
Opinions expressed by DZone contributors are their own.
Comments