#Spotify Client Test Automation Project
Spotify client Test Automation Project is an automation project that aims to automate general test cases / use cases which the end user encounter when using the Spotify Desktop Application. The project uses Sikuli Automation tool , along with Maven build system to build and manage the dependencies. Also the project uses JUnit as the tool to effectively run , report the test cases .
The project uses the following set of artifacts and their respective versions as defined in the pom.xml
JUnit
having version4.4
.sikuli-api
having version1.2.0
.sikulixapi
having version1.1.0
.java
having version1.7 or more
All the test cases and the necessary utilities and resource files are present under the test
package.
clientautomation
package undersrc/test/java
contains all the test scripts along with the JUnit Test Runner and JUnit Test suites.configs
package undersrc/test/java
contains all the configuration files for the project.utils
package undersrc/test/java
contains all the utility / helper methods which are actively used by the test scripts.images
folder undersrc/test/resources
hosts all the necessary image files required in the form of Patterns for the test cases to run
As mentioned in the documentation above the different test cases are bundled into a Test Suite named JUnitTestSuite.java
under the folder structure src/main/java/clientautomation
. This Test Suite is called through the TestRunner.java
file present at the same location.
I can run the test cases in two manners.
-
Using IDE (like Eclipse etc) I can right click on the Test Runner file like JUnitTestSuite.java or TestRunner.java that will be running all of the test scripts. To run individual scripts just right click on the Test Script and run it as JUnit Test Case.
-
Through Command line using the Maven Build Ecosystem , since the project is Apache Maven based I can run all the test cases using the single command
mvn test
ormvn clean install
. It basically fires up all the test cases listed under thesrc/test/java
folder.
###Assumptions
- The user profile is already created .
- Spotify should be running and streaming data in the country in which the test cases are to be run.
- The User Name field has the value populated already , I will not be touching that instead will be filling up the password field to login.
- The Sikuli and the JUnit dependencies are already built into the system on which the test scripts are to be run.
- Maven Home and correct Java Version (java 1.7+) is installed and correctly configured.
- The test case assumes that the login , Desktop client , Spotify's back-end functionalities to work at the time when the test case runs.
- I assume that UI Rendering and Opening of tabs , logging in and other actions takes around 3 seconds at max and I have defined that value as the deafult waiting time in the Configuration file.
- I have written a single test case around the workflow , like for the login workflow using the valid Credentials there can be many test cases like checking for the upper limit of the user name , password and with what all different characters one can use to form the password.
I added a special Test case around __New Play List Creation and Deletion __ in the test script TestNewPlaylistCreationDeletion.java
. Since Spotify is a music sreaming app and it out of box supports different compilation of songs , the user is actively involved in creating his / her own mix /collection of songs bundled in the form of playlist for different occasions like a user can create a playlist for running / gym or he / she can create one for office work.
Since this feature is very actively used , I chose this workflow to automate.Since if the user is actively engaged in creating the playlist , he /she will at some point of time will be deleting that playlist so the test case addresses both creation and deletion of the playlist.
- Tushar Sappal (sappal.tushar@gmail.com)