En este trabajo abordamos el desarrollo de un framework de automatización de pruebas para aplicaciones web y móviles, diseñado con el propósito de simplificar la elaboración de pruebas para páginas web y aplicaciones Android o nativas. El proyecto logra esto proporcionando un solo framework que logre utilizar el mismo código para ambos tipos de pruebas, permitiéndole a los desarrolladores la realización de dichas pruebas en diferentes entornos. Para tener un concepto más claro sobre la automatización de pruebas, en el Trabajo de Fin de Grado se abordan conceptos básicos sobre la calidad de software y las características que la componen, para entender de donde nace la necesidad de comprobar la calidad en los productos software. También se profundiza en definiciones especificas al testing, para su posterior entendimiento a lo largo de la lectura del trabajo; se discuten los tipos de pruebas de automatización de test más relevantes en el desarrollo de proyecto y se subraya la importancia de la automatización en ese contexto, destacando herramientas como Selenium y Appium. Se tocan también temas como la metodología del Desarrollo Guiado por Comportamiento (BDD), importante en el desarrollo del framework, ya que es la metodología utilizada y permite el uso de lenguajes comunes en los casos de pruebas. Una vez descritos todos los componentes que ayudan al entendimiento del framework y sus objetivos, pasamos a la descripción del proyecto y los pasos tomados para su realización. La creación del framework responde a la necesidad de la industria de garantizar la calidad de los productos software, donde la automatización resulta esencial para mantener la fiabilidad de las pruebas. El framework realizado se caracteriza por la configuración dinámica de variables de entorno, permitiendo a los desarrolladores ajustar el contexto de las pruebas sin modificar el código, y adaptarse así a aplicaciones web y móviles. Estas configuraciones definen los principales parámetros del entorno de los tests, como la plataforma en que se realiza la prueba, la selección de navegadores, resolución de pantalla y la configuración de idiomas. La configuración flexible de las variables de entorno asegura su fácil integración en equipos de desarrollo que se encuentren trabajando con productos tanto web como móviles. La arquitectura del framework incluye componentes para la gestión de drivers y capacidades de navegación, que permiten la ejecución de pruebas automatizadas en distintos navegadores y sistemas móviles mediante la integración de Selenium para web y Appium para dispositivos móviles. Un aspecto destacado de este proyecto es la integración de Allure Reports, que ofrece una interfaz visual y personalizable para el análisis de resultados. Allure facilita el monitoreo de las pruebas, permitiendo visualizar de manera detallada el estado de cada prueba, los posibles fallos y los datos relevantes del entorno en que fueron ejecutadas. Este sistema de reportes agrega valor en términos de trazabilidad y análisis de errores. Adicional a esto, para la implementación de la metodología del Desarrollo Guiado por Comportamiento (BDD), el framework incorpora el uso de Cucumber y Gherkin. Estos permiten que las pruebas sean escritas en lenguaje natural y sean comprensibles para todos los miembros del equipo. Finalmente, el proyecto incorpora la posibilidad de ejecutar pruebas en la nube a través de SauceLabs. Esta plataforma permite a los usuarios ejecutar pruebas de manera remota en una extensa variedad de dispositivos y navegadores. Al ofrecer esta posibilidad aseguramos que los productos software pasen los criterios requeridos de calidad en diferentes plataformas y dispositivos. En conjunto, este framework de automatización de tests representa una herramienta flexible y de fácil adaptabilidad, que contribuye de manera significativa a la mejora del desempeño de equipos multidisciplinarios.
ABSTRACT
In this work, we address the development of a test automation framework for web and mobile applications, designed to simplify the creation of tests for websites and Android or native applications. The project achieves this by providing a single framework capable of using the same code for both types of tests, enabling developers to perform these tests across different environments. To gain a clearer understanding of test automation, the Final Degree Project delves into basic concepts of software quality and its defining characteristics, to understand the need to verify quality in software products. It also explores specific definitions related to testing to enhance comprehension throughout the reading of the work; the most relevant types of test automation for project development are discussed, and the importance of automation in this context is highlighted, with tools like Selenium and Appium taking center stage. Topics such as Behavior-Driven Development (BDD) methodology are also addressed. This methodology is significant in the framework’s development, as it provides the foundation for using common languages in test cases. Once all components that facilitate understanding of the framework and its objectives are described, we move on to the project’s description and the steps taken for its implementation. The creation of the framework responds to the industry’s need to ensure the quality of software products, where automation is essential to maintain the reliability of tests. The framework developed is characterized by the dynamic configuration of environment variables, allowing developers to adjust the testing context without modifying the code, and thereby adapt to both web and mobile applications. These configurations define the main parameters of the testing environment, such as the platform on which the test is performed, browser selection, screen resolution, and language settings. The flexible configuration of environment variables ensures easy integration into development teams working on both web and mobile products. The framework’s architecture includes components for driver management and navigation capabilities, enabling automated testing across various browsers and mobile systems through the integration of Selenium for web and Appium for mobile devices. A key feature of this project is the integration of Allure Reports, which offers a visual and customizable interface for results analysis. Allure facilitates test monitoring, allowing detailed visualization of each test’s status, possible failures, and relevant data about the environment in which they were executed. This reporting system adds value in terms of traceability and error analysis. Additionally, to implement the Behavior-Driven Development (BDD) methodology, the framework incorporates the use of Cucumber and Gherkin. These tools allow tests to be written in natural language, making them comprehensible to all team members. Finally, the project includes the ability to execute tests in the cloud through SauceLabs. This platform enables users to run tests remotely on a wide range of devices and browsers. By offering this capability, we ensure that software products meet the required quality criteria across different platforms and devices. In summary, this test automation framework represents a flexible and easily adaptable tool that significantly contributes to improving the performance of multidisciplinary teams.
En este trabajo abordamos el desarrollo de un framework de automatización de pruebas para aplicaciones web y móviles, diseñado con el propósito de simplificar la elaboración de pruebas para páginas web y aplicaciones Android o nativas. El proyecto logra esto proporcionando un solo framework que logre utilizar el mismo código para ambos tipos de pruebas, permitiéndole a los desarrolladores la realización de dichas pruebas en diferentes entornos. Para tener un concepto más claro sobre la automatización de pruebas, en el Trabajo de Fin de Grado se abordan conceptos básicos sobre la calidad de software y las características que la componen, para entender de donde nace la necesidad de comprobar la calidad en los productos software. También se profundiza en definiciones especificas al testing, para su posterior entendimiento a lo largo de la lectura del trabajo; se discuten los tipos de pruebas de automatización de test más relevantes en el desarrollo de proyecto y se subraya la importancia de la automatización en ese contexto, destacando herramientas como Selenium y Appium. Se tocan también temas como la metodología del Desarrollo Guiado por Comportamiento (BDD), importante en el desarrollo del framework, ya que es la metodología utilizada y permite el uso de lenguajes comunes en los casos de pruebas. Una vez descritos todos los componentes que ayudan al entendimiento del framework y sus objetivos, pasamos a la descripción del proyecto y los pasos tomados para su realización. La creación del framework responde a la necesidad de la industria de garantizar la calidad de los productos software, donde la automatización resulta esencial para mantener la fiabilidad de las pruebas. El framework realizado se caracteriza por la configuración dinámica de variables de entorno, permitiendo a los desarrolladores ajustar el contexto de las pruebas sin modificar el código, y adaptarse así a aplicaciones web y móviles. Estas configuraciones definen los principales parámetros del entorno de los tests, como la plataforma en que se realiza la prueba, la selección de navegadores, resolución de pantalla y la configuración de idiomas. La configuración flexible de las variables de entorno asegura su fácil integración en equipos de desarrollo que se encuentren trabajando con productos tanto web como móviles. La arquitectura del framework incluye componentes para la gestión de drivers y capacidades de navegación, que permiten la ejecución de pruebas automatizadas en distintos navegadores y sistemas móviles mediante la integración de Selenium para web y Appium para dispositivos móviles. Un aspecto destacado de este proyecto es la integración de Allure Reports, que ofrece una interfaz visual y personalizable para el análisis de resultados. Allure facilita el monitoreo de las pruebas, permitiendo visualizar de manera detallada el estado de cada prueba, los posibles fallos y los datos relevantes del entorno en que fueron ejecutadas. Este sistema de reportes agrega valor en términos de trazabilidad y análisis de errores. Adicional a esto, para la implementación de la metodología del Desarrollo Guiado por Comportamiento (BDD), el framework incorpora el uso de Cucumber y Gherkin. Estos permiten que las pruebas sean escritas en lenguaje natural y sean comprensibles para todos los miembros del equipo. Finalmente, el proyecto incorpora la posibilidad de ejecutar pruebas en la nube a través de SauceLabs. Esta plataforma permite a los usuarios ejecutar pruebas de manera remota en una extensa variedad de dispositivos y navegadores. Al ofrecer esta posibilidad aseguramos que los productos software pasen los criterios requeridos de calidad en diferentes plataformas y dispositivos. En conjunto, este framework de automatización de tests representa una herramienta flexible y de fácil adaptabilidad, que contribuye de manera significativa a la mejora del desempeño de equipos multidisciplinarios.
ABSTRACT
In this work, we address the development of a test automation framework for web and mobile applications, designed to simplify the creation of tests for websites and Android or native applications. The project achieves this by providing a single framework capable of using the same code for both types of tests, enabling developers to perform these tests across different environments. To gain a clearer understanding of test automation, the Final Degree Project delves into basic concepts of software quality and its defining characteristics, to understand the need to verify quality in software products. It also explores specific definitions related to testing to enhance comprehension throughout the reading of the work; the most relevant types of test automation for project development are discussed, and the importance of automation in this context is highlighted, with tools like Selenium and Appium taking center stage. Topics such as Behavior-Driven Development (BDD) methodology are also addressed. This methodology is significant in the framework’s development, as it provides the foundation for using common languages in test cases. Once all components that facilitate understanding of the framework and its objectives are described, we move on to the project’s description and the steps taken for its implementation. The creation of the framework responds to the industry’s need to ensure the quality of software products, where automation is essential to maintain the reliability of tests. The framework developed is characterized by the dynamic configuration of environment variables, allowing developers to adjust the testing context without modifying the code, and thereby adapt to both web and mobile applications. These configurations define the main parameters of the testing environment, such as the platform on which the test is performed, browser selection, screen resolution, and language settings. The flexible configuration of environment variables ensures easy integration into development teams working on both web and mobile products. The framework’s architecture includes components for driver management and navigation capabilities, enabling automated testing across various browsers and mobile systems through the integration of Selenium for web and Appium for mobile devices. A key feature of this project is the integration of Allure Reports, which offers a visual and customizable interface for results analysis. Allure facilitates test monitoring, allowing detailed visualization of each test’s status, possible failures, and relevant data about the environment in which they were executed. This reporting system adds value in terms of traceability and error analysis. Additionally, to implement the Behavior-Driven Development (BDD) methodology, the framework incorporates the use of Cucumber and Gherkin. These tools allow tests to be written in natural language, making them comprehensible to all team members. Finally, the project includes the ability to execute tests in the cloud through SauceLabs. This platform enables users to run tests remotely on a wide range of devices and browsers. By offering this capability, we ensure that software products meet the required quality criteria across different platforms and devices. In summary, this test automation framework represents a flexible and easily adaptable tool that significantly contributes to improving the performance of multidisciplinary teams. Read More


