Research Article

Performance Analysis of Spotify® for Android with Model-Based Testing

Listing 1

Extract of Promela specification for test case generation.
(1) typedefBackstack  mtype states [MAXB]; Transition trans [MAXB]; short index;
(2)
(3) definecurBackstack devices [device]. backstack
(4) definecurStatecurBackstack. states [curBackstack. index]
(5)
(6) proctype device_4107a7166c03af9b (int device)
(7)   do
(8)   // Spotify - PlayView - PlayStateMachine
(9) :: starting || curState == Spotify_PlayView_PlayStateMachine_init ->
(10)   pushToBackstack (device, Spotify_PlayView_PlayStateMachine_init);
(11)     transition (device, VIEW_PlayView, 1); // Swipe
(12)   curState = Spotify_PlayView_PlayStateMachine_S0
(13)    :: !starting && curState == Spotify_PlayView_PlayStateMachine_S0 ->
(14)     transition (device, VIEW_PlayView, 2); // clicPrincipalMenu
(15)    curState = Spotify_PrincipalView_PrincipalStateMachine_init
(16)   // Spotify - PrincipalView - PrincipalStateMachine
(17)   :: !starting && curState ==
  Spotify_PrincipalView_PrincipalStateMachine_init ->
(18)   pushToBackstack (device,
  Spotify_PrincipalView_PrincipalStateMachine_init);
(19)     transition (device, VIEW_PrincipalView, 1); // Swipe
(20)        curState = Spotify_PrincipalView_PrincipalStateMachine_S0
(21)      :: !starting && curState ==
  Spotify_PrincipalView_PrincipalStateMachine_end ->
(22)       popFromBackstack (device);
(23)       continueTransition_4107a7166c03af9b (device)
(24)     od;
(25)