221 research outputs found

    Automatic generation of smell-free unit tests

    Get PDF
    Tese de mestrado, Engenharia Informática, 2022, Universidade de Lisboa, Faculdade de CiênciasAutomated test generation tools (such as EvoSuite) typically aim to maximize code coverage. However, they frequently disregard non-coverage aspects that can be relevant for testers, such as the quality of the generated tests. Therefore, automatically generated tests are often affected by a set of test-specific bad programming practices that may hinder the quality of both test and production code, i.e., test smells. Given that other researchers have successfully integrated non-coverage quality metrics into EvoSuite, we decided to extend the EvoSuite tool such that the generated test code is smell-free. To this aim, we compiled 54 test smells from several sources and selected 16 smells that are relevant to the context of this work. We then augmented the tool with the respective test smell metrics and investigated the diffusion of the selected smells and the distribution of the metrics. Finally, we implemented an approach to optimize the test smell metrics as secondary criteria. After establishing the optimal configuration to optimize as secondary criteria (which we used throughout the remainder of the study), we conducted an empirical study to assess whether the tests became significantly less smelly. Furthermore, we studied how the proposed metrics affect the fault detection effectiveness, coverage, and size of the generated tests. Our study revealed that the proposed approach reduces the overall smelliness of the generated tests; in particular, the diffusion of the “Indirect Testing” and “Unrelated Assertions” smells improved considerably. Moreover, our approach improved the smelliness of the tests generated by EvoSuite without compromising the code coverage or fault detection effectiveness. The size and length of the generated tests were also not affected by the new secondary criteria

    Application of Genetic Programming and Artificial Neural Network Approaches for Reconstruction of Turbulent Jet Flow Fields

    Get PDF
    Two Machine Learning (ML) methods are considered for reconstruction of turbulet signals corresponding to the Large Eddy Simulation database obtained by application of the high-resolution CABARET method accelerated on GPU cards for flow solutions of NASA Small Hot Jet Acoustic Rig (SHJAR) jets. The first method is the Feedforward Neural Networks technique, which was successfully implemented for a turbulent flow over a plunging aerofoil in (Lui and Wolf, 2019). The second method is based on the application of Genetic Programming, which is well-known in optimisation research, but has not been applied for turbulent flow reconstruction before. The reconstruction of local flow velocity and pressure signals as well as timedependent principle coefficients of the Spectral Proper Orthogonal Decomposition of turbulent pressure fluctuations are considered. Stability and dependency of the ML algorithms on the smoothness property and the sampling rate of the underlying turbulent flow signals are discussed

    Learnable Nonlinear Circuit for Printed Neuromorphic Circuits

    Get PDF

    An Interactive Environment for Supporting the Transition from Simulation to Optimization

    Get PDF
    corecore