14 research outputs found

    Automated Software Testing Using Metahurestic Technique Based on Improved Ant Algorithms for Software Testing

    Get PDF
    Testing can never completely identify all the defects within software [1]. Instead, it furnishes a criticism or comparison that compares the state and behavior of the product against oracles principles or mechanisms by which someone might recognize a problem. These oracles may include (but are not limited to) specifications, contracts[2], comparable products, past versions of the same product, inferences about intended or expected purpose, user or customer expectations, relevant standards, applicable laws, or other criteria. Testing effectiveness can be achieved by the State Transition Testing (STT) which is commonly used in real time, embedded and web based type of software systems. Aim of the current paper is to present an algorithm by applying an ant colony optimization technique, for generation of optimal and minimal test sequences for behavior specification of software. Present paper approach generates test sequence in order to obtain the complete software coverage. This paper also discusses the comparison between two Meta heuristic techniques (Genetic Algorithm and Ant Colony optimization) for transition based testing

    ReCrash: Making Crashes Reproducible

    Get PDF
    It is difficult to fix a problem without being able to reproduce it.However, reproducing a problem is often difficult and time-consuming.This paper proposes a novel algorithm, ReCrash, that generatesmultiple unit tests that reproduce a given program crash.ReCrash dynamically tracks method calls during every execution of the target program. If the program crashes, ReCrash saves information about the relevant method calls and uses the saved information to create unit tests reproducing the crash.We present reCrashJ an implementation of ReCrash for Java. reCrashJ reproducedreal crashes from javac, SVNKit, Eclipse JDT, and BST. reCrashJ is efficient, incurring 13%-64% performance overhead. If this overhead is unacceptable, then reCrashJ has another mode that has negligible overhead until a crash occurs and 0%-1.7% overhead until a second crash, at which point the test cases are generated

    Theories in Practice: Easy-to-Write Specifications that Catch Bugs

    Get PDF
    Automated testing during development helps ensure that software works according to the test suite. Traditional test suites verify a few well-picked scenarios or example inputs. However, such example-based testing does not uncover errors in legal inputs that the test writer overlooked. We propose theory-based testing as an adjunct to example-based testing. A theory generalizes a (possibly infinite) set of example-based tests. A theory is an assertion that should be true for any data, and it can be exercised by human-chosen data or by automatic data generation. A theory is expressed in an ordinary programming language, it is easy for developers to use (often even easier than example-based testing), and it serves as a lightweight form of specification. Six case studies demonstrate the utility of theories that generalize existing tests to prevent bugs, clarify intentions, and reveal design problems

    API Knowledge Guided Test Generation for Machine Learning Libraries

    Get PDF
    This thesis proposes MUTester to generate test cases for APIs of machine learning libraries by leveraging the API constraints mined from the corresponding API documentation and the API usage patterns mined from code fragments in Stack Overflow (SO). First, we propose a set of 18 linguistic rules for mining API constraints from the API documents. Then, we use the frequent itemset mining technique to mine the API usage patterns from a large corpus of machine learning API related code fragments collected from SO. Finally, we use the above two types of API knowledge to guide the test generation of existing test generators, for machine learning libraries. To evaluate the performance of MUTester, we first collected 2,889 APIs from five widely used machine learning libraries (i.e., Scikit-learn, Pandas, Numpy, Scipy, and PyTorch),then for each API, we further extract their API knowledge, i.e., API constraints and API usage patterns. Given an API, MUTester combines its API knowledge with existing test generators (e.g., search-based test generator PyEvosuite and random test generator PyRandoop) to generate test cases to test the API. Results of our experiment show that MUTester can significantly improve the corresponding test generation methods. And the improvement in code coverage ranges from 18.0% to 41.9% on average.In addition, it also reduced 21% of invalid tests generated by the existing test generators

    API Knowledge Guided Test Generation for Machine Learning Libraries

    Get PDF
    This thesis proposes MUTester to generate test cases for APIs of machine learning libraries by leveraging the API constraints mined from the corresponding API documentation and the API usage patterns mined from code fragments in Stack Overflow (SO). First, we propose a set of 18 linguistic rules for mining API constraints from the API documents. Then, we use the frequent itemset mining technique to mine the API usage patterns from a large corpus of machine learning API related code fragments collected from SO. Finally, we use the above two types of API knowledge to guide the test generation of existing test generators, for machine learning libraries. To evaluate the performance of MUTester, we first collected 2,889 APIs from five widely used machine learning libraries (i.e., Scikit-learn, Pandas, Numpy, Scipy, and PyTorch),then for each API, we further extract their API knowledge, i.e., API constraints and API usage patterns. Given an API, MUTester combines its API knowledge with existing test generators (e.g., search-based test generator PyEvosuite and random test generator PyRandoop) to generate test cases to test the API. Results of our experiment show that MUTester can significantly improve the corresponding test generation methods. And the improvement in code coverage ranges from 18.0% to 41.9% on average.In addition, it also reduced 21% of invalid tests generated by the existing test generators

    Development and testing of mobile application for remaining number of patients review in queuing system

    Get PDF
    U ovome radu izrađena je mobilna aplikacija za pregled preostalog broja pacijenata u redomatskom redu. Aplikacija prikazuje stanje u redovima bolnice koju korisnik može odabrati ili učitati pomoću QR koda. Također, korisnik može unijeti broj s listića iz redomata i tako dobiti informacije o trenutnom stanju za točno taj broj. Aplikacija je napravljena po uzoru na CLEAN arhitekturu i obrazac dizajna MVVM za dijelove korisničkog sučelja. Aplikacija je rađena kroz razvoj programske podrške vođen testiranjem na primjeru pa su tako provedeni testovi jedinica gotovo cijeloga koda aplikacije, a nakon izrade provedeno je testiranje performansi i ručno testiranje prema testnom scenariju. Ako programer nije uvježban i tek započinje s razvojem programske podrške vođenim testiranjem, vrijeme za pisanje aplikacije bit će znatno duže od onoga uobičajenoga. Testovi performansi pokazali su da je aplikacija stabilna i fluidna i da ne postoje curenja memorije niti procesi koji preopterećuju procesor. Kvaliteta aplikacije na kraju je provjerena ručnim testiranjem po predloženom testnom scenariju koje je pokazalo da aplikacija izvršava sve zadane funkcionalnosti bez pogrešaka.In this paper the goal was to create mobile application to view the remaining number of patients in a row. The application displays the status in the hospital rows that the user can select or load using a QR code. Also, the user can enter a number from the list from the ticket dispenser and thus obtain information about the current status for that exact number, the data is continuously retrieved from the server and the constant status in the rows is displayed at all times. The application is modeled on the CLEAN architecture and design form MVVM for parts of the user interface. The application was developed through an approach of test-driven software development, so unit tests of almost the entire application code were performed, and after development, manual testing was preformed according to the test scenario, and performance testing was preformed too. The approach to developing test-driven software has proven to be excellent and the only downside is the time it takes to learn how to apply it properly. If the programmer is not trained and is just starting to develop test-driven software, the time to write an application will be much longer than usual, but once the principle is well learned and practiced, it produces great results and it is definitely worth starting with this method of software development. Performance tests have shown that the application is stable and fluid, there are no memory leaks or processes that overload the processor. The quality of the application was eventually verified by manual testing according to a test scenario, which showed that the application performs all given functionalities without error

    Contract driven development = test driven development: writing test cases

    No full text
    Although unit tests are recognized as an important tool in software development, programmers prefer to write code, rather than unit tests. Despite the emergence of tools like JUnit which automate part of the process, unit testing remains a time-consuming, resource-intensive, and not particularly appealing activity. This paper introduces a new development method, called Contract Driven Development. This development method is based on a novel mechanism that extracts test cases from failure-producing runs that the programmers trigger. It exploits actions that developers perform anyway as part of their normal process of writing code. Thus, it takes the task of writing unit tests off the developers’ shoulders, while still taking advantage of their knowledge of the intended semantics and structure of the code. The approach is based on the presence of contracts in code, which act as the oracle of the test cases. The test cases are extracted completely automatically, are run in the background, and can easily be maintained over versions. The tool implementing this methodology is called Cdd and is available both in binary and in source form

    Doctor of Philosophy

    Get PDF
    dissertationCompilers are indispensable tools to developers. We expect them to be correct. However, compiler correctness is very hard to be reasoned about. This can be partly explained by the daunting complexity of compilers. In this dissertation, I will explain how we constructed a random program generator, Csmith, and used it to find hundreds of bugs in strong open source compilers such as the GNU Compiler Collection (GCC) and the LLVM Compiler Infrastructure (LLVM). The success of Csmith depends on its ability of being expressive and unambiguous at the same time. Csmith is composed of a code generator and a GTAV (Generation-Time Analysis and Validation) engine. They work interactively to produce expressive yet unambiguous random programs. The expressiveness of Csmith is attributed to the code generator, while the unambiguity is assured by GTAV. GTAV performs program analyses, such as points-to analysis and effect analysis, efficiently to avoid ambiguities caused by undefined behaviors or unspecifed behaviors. During our 4.25 years of testing, Csmith has found over 450 bugs in the GNU Compiler Collection (GCC) and the LLVM Compiler Infrastructure (LLVM). We analyzed the bugs by putting them into different categories, studying the root causes, finding their locations in compilers' source code, and evaluating their importance. We believe analysis results are useful to future random testers, as well as compiler writers/users

    Mapeo sistemático y estudio de caso sobre técnicas de generación automática de pruebas

    Get PDF
    Incluye bibliografía.El trabajo tiene como objetivo explorar la generación automática de casos de prueba a través de la identificación de las técnicas y sus problemas e investigar su utilidad práctica. Se realizó un mapeo sistemático de la literatura, extendiendo dos trabajos relacionados a la tesis para conocer las técnicas y los problemas investigados. A partir de este mapeo se realizó un estudio de caso con herramientas de generación para evaluar su eficacia con respecto a la detección de defectos
    corecore