Spectrum Brand – Mobile Based Application Testing

Spectrum Brands Holdings, Inc., a Fortune 500 company with a rich history of innovation spanning back to the early 20th century, continues to push boundaries with cutting-edge technology in its consumer products. A standout example is its smart door lock system, managed through an Android mobile application, offering users both enhanced security and convenience.
Testing Framework:
To ensure the utmost quality and reliability of the smart door lock application, I developed a robust Behavior-Driven Development (BDD) testing framework. This framework utilizes Python for scripting automated test cases, Behave for BDD, and Appium for mobile application testing. Automated tests are executed on the Appium server, interacting with the mobile application to simulate user interactions and validate functionality.
Hardware Integration:
In addition to software testing, I engineered a hardware unit to directly interact with the smart door lock. This unit, powered by Arduino and Raspberry Pi, executes lock and unlock operations, mimicking real-world usage scenarios. The Raspberry Pi acts as a bridge, connecting to the Selenium framework via SSH, receiving commands from automated tests, and forwarding them to the Arduino, which performs the actions on the smart lock.
I also designed a custom hardware setup to regulate voltage levels, ensuring the smart door lock operates within safe electrical parameters. This module is critical for testing the lock’s resilience and performance under varying power conditions, which can impact functionality and longevity.
End-to-End Validation:
The testing setup includes sensors to monitor the lock’s state, offering real-time feedback to the testing framework. A stepper motor, controlled by the Arduino, manipulates the lock’s knob, allowing the framework to verify changes in lock status in the mobile application. This comprehensive validation process ensures that the user interface accurately reflects the physical state of the lock, guaranteeing a seamless user experience.
Reporting:
To streamline the report generation process, I devised a test runner class responsible for executing test cases and generating reports. However, a challenge emerged: manual intervention was required to open the command line and execute the necessary commands. To tackle this, I developed a Python module. This module automated the process by opening the command prompt and executing the commands sequentially to generate the Allure report.
Sample Behave commands used to generate the Allure report:
behave -f allure_behave.formatter:AllureFormatter -o <path_to_allure_results_directory>
allure serve <path_to_allure_results_directory>
These commands execute Behave tests and format the results using the Allure formatter, storing them in the specified directory. Subsequently, the `allure serve` command launches a local server to view the generated Allure report in a web browser.
Conclusion:
By integrating software automation with hardware verification, this project provides a comprehensive testing solution for Spectrum Brands’ smart door lock system. This approach not only streamlines the testing process but also enhances the product’s reliability, demonstrating Spectrum Brands’ dedication to quality in the dynamic realm of smart home technology.