2

We are using c# to return byte data of an mp3, but the mp3 is not yet encoded correctly, so we need a way to test it.

Currently we've built a page in our mvc that consumes the function and we simply run the url to try to load it into an mp3 player. Its a clunky way to do it, I'm sure. How should we really be testing for valid mp3 byte data?

Kristian
  • 21,204
  • 19
  • 101
  • 176

1 Answers1

1

Split system into pieces and test them separately:

  • MP3 creation itself (as byte array/file) - can be tested by using some command-line "MP3 to something" converter or a library that can play MP3.
  • generating url for client
  • streaming given file to client (constant MP3 if you need to test in player, otherwise any byte array would do as long as it returned correctly with correct headers).
Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
  • Thank you for your response, I think, then, that we are on the right track -- we're basically doing all three of those steps. It turns out that step one was failing because in the command line execution of the media converter, the process was getting hung up due to a prompt for the EULA agreement. haha wow! – Kristian May 30 '12 at 15:39