Skip to content
duganchen edited this page Jul 25, 2020 · 4 revisions

Quetzalcoatl 2.0 Testing Plan

Quetzalcoatl 2 is has a Model View Presenter architecture, with the Presenter in a separate library called the Controller. Generally speaking, the Presenter is placed behind both the main window and the QAbstractItemModel subclasses. The plan is to have QTest integration-test the Presenter by spinning up instances of MPD.

This has unfortunately turned out to be somewhat brittle. You need to wait for a certain amount of time between starting that instance of MPD and connecting to it, and there seems to be no way to determine how much time apart from trial and error. It's obviously going to be system-dependent.

Nevertheless, here are some things to test:

Connecting

  • attempting to connect when MPD is not running
  • attempting to connect to a Unix socket path that doesn't exist
  • connecting successfully
  • The connection was lost (and make sure you can reconnect!)

Server Events

  • An update was completed
  • The queue was modified
  • The list of stored playlists changed
  • The player state changed from "not playing" to "playing"
  • "Random" was toggled
  • Repeat" was toggled

User events

  • Songs in the queue were selected
  • The queue was saved (error conditions?)
  • A song in the queue was double-clicked on
  • The song progress slider was dragged
  • "Playlists" node is expanded and a playlist is doubleclicked
  • "Genres" node is expanded until the user double-clicks on a song in "All Songs"
  • "Genres" node is expanded until the user double clicks on a song under an album
  • "Albums" node is expanded until the user double clicks on a song
  • "Artists" node is expanded until the user double clicks on a song under "All Songs"
  • "Albums" node is expanded until the user double clicks on a song
  • "/" node is expanded until the user double clicks on a song
  • "Songs" node is expanded and the user double clicks on a song
  • Songs are dragged around in the playlist
  • Songs are dragged from the database to the playlist
  • An attempt to delete a playlist fails (perhaps it's an .m3u embedded into a FLAC)
Clone this wiki locally