983 resultados para test cases generator
Resumo:
Este proyecto estudia los fundamentos y las técnicas de las pruebas de software. Veremos lo importante que pueden llegar a ser las pruebas, mostrando diferentes desastres causados por fallos en el software. También estudiaremos las diferentes herramientas que se utilizan para llevar a cabo la gestión, administración y ejecución de estas pruebas. Finalmente aplicaremos los conceptos estudiados mediante un caso práctico. Crearemos los casos de prueba funcionales basándonos en las especificaciones del protocolo MDB/ICP e instalaremos y aprenderemos cómo crear estos casos con una de las herramientas estudiadas en la parte teórica. ABSTRACT: This project studies the fundamentals and techniques of software testing. We will see how important the evidence showing different disasters caused by bugs in the software can become. We will also study the different tools used to carry out the management, administration and execution of these tests. Finally, we apply the concepts studied by a case study. We create test cases based on functional specifications MDB/ICP protocol We will install and learn how to create such cases by one of the tools studied in the theoretical part.
Resumo:
Este trabajo presenta un método discreto para el cálculo de estabilidad hidrodinámica y análisis de sensibilidad a perturbaciones externas para ecuaciones diferenciales y en particular para las ecuaciones de Navier-Stokes compressible. Se utiliza una aproximación con variable compleja para obtener una precisión analítica en la evaluación de la matriz Jacobiana. Además, mapas de sensibilidad para la sensibilidad a las modificaciones del flujo de base y a una fuerza constante permiten identificar las regiones del campo fluido donde una modificacin (ej. fuerza puntual) tiene un efecto estabilizador del flujo. Se presentan cuatro casos de prueba: (1) un caso analítico para comprobar la derivación discreta, (2) una cavidad cerrada a bajo Reynolds para mostrar la mayor precisión en el cálculo de los valores propios con la aproximación de paso complejo, (3) flujo 2D en un cilindro circular para validar la metodología, y (4) flujo en un cavidad abierta, presentado para validar el método en casos de inestabilidades convectivamente inestables. Los tres últimos casos mencionados (2-4) se resolvieron con las ecuaciones de Navier-Stokes compresibles, utilizando un método Discontinuous Galerkin Spectral Element Method. Se obtuvo una buena concordancia para el caso de validación (3), cuando se comparó el nuevo método con resultados de la literatura. Además, este trabajo muestra que para el cálculo de los modos propios directos y adjuntos, así como para los mapas de sensibilidad, el uso de variables complejas es de suprema importancia para obtener una predicción precisa. El método descrito es aplicado al análisis para la estabilización de la estela generada por un disco actuador, que representa un modelo sencillo para hélices, rotores de helicópteros o turbinas eólicas. Se explora la primera bifurcación del flujo para un disco actuador, y se sugiere que está asociada a una inestabilidad de tipo Kelvin-Helmholtz, cuya estabilidad se controla con en el número de Reynolds y en la resistencia del disco actuador (o fuerza resistente). En primer lugar, se verifica que la disminución de la resistencia del disco tiene un efecto estabilizador parecido a una disminución del Reynolds. En segundo lugar, el análisis hidrodinmico discreto identifica dos regiones para la colocación de una fuerza puntual que controle las inestabilidades, una cerca del disco y otra en una zona aguas abajo. En tercer lugar, se muestra que la inclusión de un forzamiento localizado cerca del actuador produce una estabilización más eficiente que al forzar aguas abajo. El análisis de los campos de flujo controlados confirma que modificando el gradiente de velocidad cerca del actuador es más eficiente para estabilizar la estela. Estos resultados podrían proporcionar nuevas directrices para la estabilización de la estela de turbinas de viento o de marea cuando estén instaladas en un parque eólico y minimizar las interacciones no estacionarias entre turbinas. ABSTRACT A discrete framework for computing the global stability and sensitivity analysis to external perturbations for any set of partial differential equations is presented. In particular, a complex-step approximation is used to achieve near analytical accuracy for the evaluation of the Jacobian matrix. Sensitivity maps for the sensitivity to base flow modifications and to a steady force are computed to identify regions of the flow field where an input could have a stabilising effect. Four test cases are presented: (1) an analytical test case to prove the theory of the discrete framework, (2) a lid-driven cavity at low Reynolds case to show the improved accuracy in the calculation of the eigenvalues when using the complex-step approximation, (3) the 2D flow past a circular cylinder at just below the critical Reynolds number is used to validate the methodology, and finally, (4) the flow past an open cavity is presented to give an example of the discrete method applied to a convectively unstable case. The latter three (2–4) of the aforementioned cases were solved with the 2D compressible Navier–Stokes equations using a Discontinuous Galerkin Spectral Element Method. Good agreement was obtained for the validation test case, (3), with appropriate results in the literature. Furthermore, it is shown that for the calculation of the direct and adjoint eigenmodes and their sensitivity maps to external perturbations, the use of complex variables is paramount for obtaining an accurate prediction. An analysis for stabilising the wake past an actuator disc, which represents a simple model for propellers, helicopter rotors or wind turbines is also presented. We explore the first flow bifurcation for an actuator disc and it suggests that it is associated to a Kelvin- Helmholtz type instability whose stability relies on the Reynolds number and the flow resistance applied through the disc (or actuator forcing). First, we report that decreasing the disc resistance has a similar stabilising effect to an decrease in the Reynolds number. Second, a discrete sensitivity analysis identifies two regions for suitable placement of flow control forcing, one close to the disc and one far downstream where the instability originates. Third, we show that adding a localised forcing close to the actuator provides more stabilisation that forcing far downstream. The analysis of the controlled flow fields, confirms that modifying the velocity gradient close to the actuator is more efficient to stabilise the wake than controlling the sheared flow far downstream. An interesting application of these results is to provide guidelines for stabilising the wake of wind or tidal turbines when placed in an energy farm to minimise unsteady interactions.
Resumo:
Recently, the target function for crystallographic refinement has been improved through a maximum likelihood analysis, which makes proper allowance for the effects of data quality, model errors, and incompleteness. The maximum likelihood target reduces the significance of false local minima during the refinement process, but it does not completely eliminate them, necessitating the use of stochastic optimization methods such as simulated annealing for poor initial models. It is shown that the combination of maximum likelihood with cross-validation, which reduces overfitting, and simulated annealing by torsion angle molecular dynamics, which simplifies the conformational search problem, results in a major improvement of the radius of convergence of refinement and the accuracy of the refined structure. Torsion angle molecular dynamics and the maximum likelihood target function interact synergistically, the combination of both methods being significantly more powerful than each method individually. This is demonstrated in realistic test cases at two typical minimum Bragg spacings (dmin = 2.0 and 2.8 Å, respectively), illustrating the broad applicability of the combined method. In an application to the refinement of a new crystal structure, the combined method automatically corrected a mistraced loop in a poor initial model, moving the backbone by 4 Å.
Resumo:
Este trabalho propõe dois métodos para teste de sistemas de software: o primeiro extrai ideias de teste de um modelo desenvolvido em rede de Petri hierárquica e o segundo valida os resultados após a realização dos testes utilizando um modelo em OWL-S. Estes processos aumentam a qualidade do sistema desenvolvido ao reduzir o risco de uma cobertura insuficiente ou teste incompleto de uma funcionalidade. A primeira técnica apresentada consiste de cinco etapas: i) avaliação do sistema e identificação dos módulos e entidades separáveis, ii) levantamento dos estados e transições, iii) modelagem do sistema (bottom-up), iv) validação do modelo criado avaliando o fluxo de cada funcionalidade e v) extração dos casos de teste usando uma das três coberturas de teste apresentada. O segundo método deve ser aplicado após a realização dos testes e possui cinco passos: i) primeiro constrói-se um modelo em OWL (Web Ontology Language) do sistema contendo todas as informações significativas sobre as regras de negócio da aplicação, identificando as classes, propriedades e axiomas que o regem; ii) em seguida o status inicial antes da execução é representado no modelo através da inserção das instâncias (indivíduos) presentes; iii) após a execução dos casos de testes, a situação do modelo deve ser atualizada inserindo (sem apagar as instâncias já existentes) as instâncias que representam a nova situação da aplicação; iv) próximo passo consiste em utilizar um reasoner para fazer as inferências do modelo OWL verificando se o modelo mantém a consistência, ou seja, se não existem erros na aplicação; v) finalmente, as instâncias do status inicial são comparadas com as instâncias do status final, verificando se os elementos foram alterados, criados ou apagados corretamente. O processo proposto é indicado principalmente para testes funcionais de caixa-preta, mas pode ser facilmente adaptado para testes em caixa branca. Obtiveram-se casos de testes semelhantes aos que seriam obtidos em uma análise manual mantendo a mesma cobertura do sistema. A validação provou-se condizente com os resultados esperados, bem como o modelo ontológico mostrouse bem fácil e intuitivo para aplicar manutenções.
Resumo:
Los jueces online están cobrando cada día más importancia, especialmente en el ámbito de la enseñanza. Su funciona-miento es simple, un juez/profesor sube un problema de programación con un enunciado y unos casos de prueba (entradas y salidas esperadas) al juez online. El alumno/concursante deberá subir el código que considera como solución al problema. Si el código del alumno devuelve las mismas salidas que las que se encuentran en los casos de prueba para las correspondientes entradas en los test-cases dada las mismas entradas, el código se considera correcto. En la Facultad de Informática de la Universidad Complutense de Madrid ha aparecido un juez virtual que cada vez está siendo más usado por los docentes como complemento a la hora de evaluar. Este juez online es DomJudge. DomJudge es un juez online desarrollado en la universidad de Utrecht con el fin de ser un juez virtual de concursos de programación. Su código es libre y se puede descargar y modificar, lo que lo hace ideal si se quiere adaptar su funcionamiento. Es bien sabido que generar casos de prueba de calidad es una tarea muy compleja. Existen diversas técnicas que ayudan a la generación automática de tests. Por ejemplo, la ejecución simbólica permite generar tests garantizando que todos los caminos de ejecución del programa son ejercitados hasta una cierta profundidad. El objetivo de este proyecto es hacer uso de estas técnicas de testing para generar casos de prueba de forma automática. Para que la autoevaluación realizada por estos jueces sea efectiva, los profesores deben proporcionar casos de prueba de calidad que son ejecutados automáticamente cuando los alumnos suben sus soluciones. Escribir estos casos de prueba resulta costoso y complejo, y es en este punto, donde el uso de jPET podría resultar muy útil. Los casos de prueba generados por jPET podrían servir como punto de partida a la hora de generar un conjunto de casos de prueba de calidad. Un aspecto muy interesante en este sentido, es que no es necesario que los programas de los alumnos uti licen el lenguaje Java. Lo único que sería necesario es que el profesor proporcione una solución escrita en Java. A partir de esta se podrían generar los casos de prueba iniciales. Si se diese el caso de que las soluciones de los alumnos viniesen escritas en Java, se podrían plantear enfoques más interesantes en los cuales los tests se forman a partir de ambas soluciones. La del alumno, para generarlos datos de entrada, y la del profesor, para chequear que las salidas para esas entradas son las correctas. Por eso hemos llevado a cabo no solo una traducción automática del xml generado por JPET en ficheros in y out. Sino una total integración con el sistema DomJudge para poder generar los casos de prueba sin intermediarios. Gracias a esta integración podemos facilitar el trabajo de los profesores a la hora de crear problemas en jueces online y conseguimos una generación automática de tests en DomJudge.
Resumo:
O Teste Baseado em Modelos (TBM) emergiu como uma estratégia promissora para minimizar problemas relacionados à falta de tempo e recursos em teste de software e visa verificar se a implementação sob teste está em conformidade com sua especificação. Casos de teste são gerados automaticamente a partir de modelos comportamentais produzidos durante o ciclo de desenvolvimento de software. Entre as técnicas de modelagem existentes, Sistemas de Transição com Entrada/Saída (do inglês, Input/Output Transition Systems - IOTSs), são modelos amplamente utilizados no TBM por serem mais expressivos do que Máquinas de Estado Finito (MEFs). Apesar dos métodos existentes para geração de testes a partir de IOTSs, o problema da seleção de casos de testes é um tópico difícil e importante. Os métodos existentes para IOTS são não-determinísticos, ao contrário da teoria existente para MEFs, que fornece garantia de cobertura completa com base em um modelo de defeitos. Esta tese investiga a aplicação de modelos de defeitos em métodos determinísticos de geração de testes a partir de IOTSs. Foi proposto um método para geração de conjuntos de teste com base no método W para MEFs. O método gera conjuntos de teste de forma determinística além de satisfazer condições de suficiência de cobertura da especificação e de todos os defeitos do domínio de defeitos definido. Estudos empíricos avaliaram a aplicabilidade e eficácia do método proposto: resultados experimentais para analisar o custo de geração de conjuntos de teste utilizando IOTSs gerados aleatoriamente e um estudo de caso com especificações da indústria mostram a efetividade dos conjuntos gerados em relação ao método tradicional de Tretmans.
Resumo:
Thesis (Ph.D.)--University of Washington, 2016-06
Resumo:
Formal specifications can precisely and unambiguously define the required behavior of a software system or component. However, formal specifications are complex artifacts that need to be verified to ensure that they are consistent, complete, and validated against the requirements. Specification testing or animation tools exist to assist with this by allowing the specifier to interpret or execute the specification. However, currently little is known about how to do this effectively. This article presents a framework and tool support for the systematic testing of formal, model-based specifications. Several important generic properties that should be satisfied by model-based specifications are first identified. Following the idea of mutation analysis, we then use variants or mutants of the specification to check that these properties are satisfied. The framework also allows the specifier to test application-specific properties. All properties are tested for a range of states that are defined by the tester in the form of a testgraph, which is a directed graph that partially models the states and transitions of the specification being tested. Tool support is provided for the generation of the mutants, for automatically traversing the testgraph and executing the test cases, and for reporting any errors. The framework is demonstrated on a small specification and its application to three larger specifications is discussed. Experience indicates that the framework can be used effectively to test small to medium-sized specifications and that it can reveal a significant number of problems in these specifications.
Resumo:
While object-oriented programming offers great solutions for today's software developers, this success has created difficult problems in class documentation and testing. In Java, two tools provide assistance: Javadoc allows class interface documentation to be embedded as code comments and JUnit supports unit testing by providing assert constructs and a test framework. This paper describes JUnitDoc, an integration of Javadoc and JUnit, which provides better support for class documentation and testing. With JUnitDoc, test cases are embedded in Javadoc comments and used as both examples for documentation and test cases for quality assurance. JUnitDoc extracts the test cases for use in HTML files serving as class documentation and in JUnit drivers for class testing. To address the difficult problem of testing inheritance hierarchies, JUnitDoc provides a novel solution in the form of a parallel test hierarchy. A small controlled experiment compares the readability of JUnitDoc documentation to formal documentation written in Object-Z. Copyright (c) 2005 John Wiley & Sons, Ltd.
Resumo:
It is not surprising that students are unconvinced about the benefits of formal methods if we do not show them how these methods can be integrated with other activities in the software lifecycle. In this paper, we describe an approach to integrating formal specification with more traditional verification and validation techniques in a course that teaches formal specification and specification-based testing. This is accomplished through a series of assignments on a single software component that involves specifying the component in Object-Z, validating that specification using inspection and a specification animation tool, and then testing an implementation of the specification using test cases derived from the formal specification.
Resumo:
This thesis concerns mixed flows (which are characterized by the simultaneous occurrence of free-surface and pressurized flow in sewers, tunnels, culverts or under bridges), and contributes to the improvement of the existing numerical tools for modelling these phenomena. The classic Preissmann slot approach is selected due to its simplicity and capability of predicting results comparable to those of a more recent and complex two-equation model, as shown here with reference to a laboratory test case. In order to enhance the computational efficiency, a local time stepping strategy is implemented in a shock-capturing Godunov-type finite volume numerical scheme for the integration of the de Saint-Venant equations. The results of different numerical tests show that local time stepping reduces run time significantly (between −29% and −85% CPU time for the test cases considered) compared to the conventional global time stepping, especially when only a small region of the flow field is surcharged, while solution accuracy and mass conservation are not impaired. The second part of this thesis is devoted to the modelling of the hydraulic effects of potentially pressurized structures, such as bridges and culverts, inserted in open channel domains. To this aim, a two-dimensional mixed flow model is developed first. The classic conservative formulation of the 2D shallow water equations for free-surface flow is adapted by assuming that two fictitious vertical slots, normally intersecting, are added on the ceiling of each integration element. Numerical results show that this schematization is suitable for the prediction of 2D flooding phenomena in which the pressurization of crossing structures can be expected. Given that the Preissmann model does not allow for the possibility of bridge overtopping, a one-dimensional model is also presented in this thesis to handle this particular condition. The flows below and above the deck are considered as parallel, and linked to the upstream and downstream reaches of the channel by introducing suitable internal boundary conditions. The comparison with experimental data and with the results of HEC-RAS simulations shows that the proposed model can be a useful and effective tool for predicting overtopping and backwater effects induced by the presence of bridges and culverts.
Resumo:
A formalism recently introduced by Prugel-Bennett and Shapiro uses the methods of statistical mechanics to model the dynamics of genetic algorithms. To be of more general interest than the test cases they consider. In this paper, the technique is applied to the subset sum problem, which is a combinatorial optimization problem with a strongly non-linear energy (fitness) function and many local minima under single spin flip dynamics. It is a problem which exhibits an interesting dynamics, reminiscent of stabilizing selection in population biology. The dynamics are solved under certain simplifying assumptions and are reduced to a set of difference equations for a small number of relevant quantities. The quantities used are the population's cumulants, which describe its shape, and the mean correlation within the population, which measures the microscopic similarity of population members. Including the mean correlation allows a better description of the population than the cumulants alone would provide and represents a new and important extension of the technique. The formalism includes finite population effects and describes problems of realistic size. The theory is shown to agree closely to simulations of a real genetic algorithm and the mean best energy is accurately predicted.
Resumo:
Analysis of the use of ICT in the aerospace industry has prompted the detailed investigation of an inventory-planning problem. There is a special class of inventory, consisting of expensive repairable spares for use in support of aircraft operations. These items, called rotables, are not well served by conventional theory and systems for inventory management. The context of the problem, the aircraft maintenance industry sector, is described in order to convey some of its special characteristics in the context of operations management. A literature review is carried out to seek existing theory that can be applied to rotable inventory and to identify a potential gap into which newly developed theory could contribute. Current techniques for rotable planning are identified in industry and the literature: these methods are modelled and tested using inventory and operational data obtained in the field. In the expectation that current practice leaves much scope for improvement, several new models are proposed. These are developed and tested on the field data for comparison with current practice. The new models are revised following testing to give improved versions. The best model developed and tested here comprises a linear programming optimisation, which finds an optimal level of inventory for multiple test cases, reflecting changing operating conditions. The new model offers an inventory plan that is up to 40% less expensive than that determined by current practice, while maintaining required performance.
Resumo:
E-learning is supposing an innovation in teaching, raising from the development of new technologies. It is based in a set of educational resources, including, among others, multimedia or interactive contents accessible through Internet or Intranet networks. A whole spectrum of tools and services support e-learning, some of them include auto-evaluation and automated correction of test-like exercises, however, this sort of exercises are very constrained because of its nature: fixed contents and correct answers suppose a limit in the way teachers may evaluation students. In this paper we propose a new engine that allows validating complex exercises in the area of Data Structures and Algorithms. Correct solutions to exercises do not rely only in how good the execution of the code is, or if the results are same as expected. A set of criteria on algorithm complexity or correctness in the use of the data structures are required. The engine presented in this work covers a wide set of exercises with these characteristics allowing teachers to establish the set of requirements for a solution, and students to obtain a measure on the quality of their solution in the same terms that are later required for exams.
Resumo:
Красимир Манев, Антон Желязков, Станимир Бойчев - В статията е представена имплементацията на последната фаза на автоматичен генератор на тестови данни за структурно тестване на софтуер, написан на обектно-ориентиран език за програмиране – генерирането на изходен код на тестващия модул. Някои детайли от имплементацията на останалите фази, които са важни за имплементацията на последната фаза, са представени първо. След това е описан и алгоритъмът за генериране на кода на тестващия модул.