Abstract

Uncontrollability is troublesome for unit testing. It causes a non-deterministic behavior where the same input can produce different results based on different executions. The non-deterministic characteristic makes it impossible to test the internal logic of a method because it suffers from tight coupling, a single responsibility principle violation, being an untestable code, being non-reusable or hard to maintain. This paper describes a tool, namely the non-deterministic Code Detection Tool (nCODET) that aims to assist novice developers to write testable codes by avoiding the non-deterministic characteristic in their codes. Our research focuses on the unit testability of classes; particularly the effort involvedin constructing unit test cases.

Highlights

  • Software testing has always been perceived as a time-consuming process, costly and less significant

  • This paper describes a tool, namely the non-deterministic Code Detection Tool that aims to assist novice developers to write testable codes by avoiding the non-deterministic characteristic in their codes

  • Our research focuses on the unit testability of classes; the effort involved in constructing unit test cases

Read more

Summary

Introduction

Software testing has always been perceived as a time-consuming process, costly and less significant. If the testability of a software artifact is high, it indicates that the software is easy to test. Devietti et al (2009) described, due to inability to control the input, software defect can only be detected after it is executed a hundred times. Uncontrollability leads to non-deterministic behavior where same inputs can produce different outputs on different execution. The non-deterministic characteristics of a code makes it impossible to test the internal logic of a unit from a unit testing’s perspective. Study by Hayes et al (2015) and Hussain et al (2016) shows that the effectiveness of testing can be improved by designing testable artefacts such as software requirements, a document and the source code of the software.

Non-Deterministic Characteristic
Results and Discussion
Findings
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call