Test With Me

Testing File Attachments

The chat product I’ve been working on recently started allowing attachments to be added to conversations. In order to fully test this feature, I thought it would be good to create a couple folders with helpful file types and sizes. In order to create a file of a specific size, I used the mkfile command illustrated below:

1
mkfile -n 100m 100M.zip

You can specify the size using the following letters: b(ytes), k(ilobytes), m(egabytes), and g(igabytes). I found a couple bugs using these files where the chat windows did not handle file attachments greater than the size limit very well.

For file types, I created some files with common file types. Given that we show previews for certain files, I wanted to make sure we supported most of the common file types.

I have both of these folders located in my favorites column in the OS X finder. Having these folders in a location that’s easily accessible made testing file attachments pretty effortless. Making testing more efficient is something I’m always working on and having these files handy makes it so that any time working with file attachments, I can rotate through them quickly and maybe find a bug or two.

Comments