ABSTRACT
Performing unit testing on concurrent programs is a known challenge. Several solutions have been proposed for the challenges, that provide only a partial answer. We argue that there are two kinds of concurrent code writing, namely concurrency protocols and concurrent "business code", and that they are different not only in the coding itself, but also in the way unit testing should be done for them. We show that the current solutions to concurrent unit testing only give a satisfactory answer to concurrency protocols, but not to concurrent business code. We have designed and implemented a unit testing framework suitable for concurrent business code, as part of the IBM Multicore Software Development Kit. This paper presents the distinction between the types of concurrent programming, and describes the new framework.
- }}http://www.junit.org.Google Scholar
- }}D. Barvitsky. Techniques for testing concurrent code in nunit. http://tinyurl.com/y4adejz.Google Scholar
- }}A. Bron, E. Farchi, Y. Magid, Y. Nir, and S. Ur. Applications of synchronization coverage. In PPoPP '05: Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 206--212, New York, NY, USA, 2005. ACM. Google ScholarDigital Library
- }}O. Edelstein, E. Farchi, Y. Nir, G. Ratsaby, and S. Ur. Multithreaded Java program test generation. IBM Systems Journal, 41(1), 2002. Also available as http://alphaworks.ibm.com/tech/contest. Google ScholarDigital Library
- }}B. Goetz, T. Peierls, J. Bloch, J. Bowbeer, D. Lea, and D. Holmes. Java Concurrency in Practice. Addison-Wesley Professional, 2005. Google ScholarDigital Library
- }}Z. Letko, T. Vojnar, and B. Křena. Atomrace: data race and atomicity violation detector and healer. In PADTAD '08: Proceedings of the 6th workshop on Parallel and distributed systems, pages 1--10, New York, NY, USA, 2008. ACM. Google ScholarDigital Library
- }}M. Musuvathi and S. Qadeer. Chess: Systematic stress testing of concurrent software. In LOPSTR, pages 15--16, 2006. Google ScholarDigital Library
- }}Y. Nir-Buchbinder, R. Tzoref, and S. Ur. Deadlocks: From exhibiting to healing. In Runtime Verification, 8th International Workshop, RV 2008, Budapest, Hungary, March 30, 2008. Selected Papers, pages 104--118, Berlin, Heidelberg, 2008. Springer-Verlag. Google ScholarDigital Library
- }}W. Pugh and N. Ayewah. Unit testing concurrent software. In ASE '07: Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering, pages 513--516, New York, NY, USA, 2007. ACM. Google ScholarDigital Library
- }}Y. Qi, R. Das, Z. D. Luo, and M. Trotter. Multicoresdk: a practical and efficient data race detector for real-world applications. In PADTAD '09: Proceedings of the 7th Workshop on Parallel and Distributed Systems, pages 1--11, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- }}M. Ricken and R. Cartwright. Concjunit: unit testing for concurrent programs. In PPPJ '09: Proceedings of the 7th International Conference on Principles and Practice of Programming in Java, pages 129--132, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
Index Terms
- Unit testing for concurrent business code
Recommendations
Testing atomicity of composed concurrent operations
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsWe address the problem of testing atomicity of composed concurrent operations. Concurrent libraries help programmers exploit parallel hardware by providing scalable concurrent operations with the illusion that each operation is executed atomically. ...
Smart Unit Testing Framework
ISSREW '12: Proceedings of the 2012 IEEE 23rd International Symposium on Software Reliability Engineering WorkshopsUnit testing(UT) is an important step in ensuring the quality of software. Considerable effort is spent in unit testing. There are several frameworks to help with UT. Some common frameworks are Cunit, Junit, Nunit etc. All of these have very similar ...
Improved multithreaded unit testing
ESEC/FSE '11: Proceedings of the 19th ACM SIGSOFT symposium and the 13th European conference on Foundations of software engineeringMultithreaded code is notoriously hard to develop and test. A multithreaded test exercises the code under test with two or more threads. Each test execution follows some schedule/interleaving of the multiple threads, and different schedules can give ...
Comments