Showing results for 
Show  only  | Search instead for 
Did you mean: 
Community Participant

Test plans for API scripts

I'm doing some API programming and was wondering if anyone had a formalized test plan for their programs that they would be willing to share. At this point, I'm just writing scripts and running them on our test, then beta environments, but I'm not really sure what sort of "gotchas" I could run into that I might not be thinking of, since I'm a newb with the Canvas API & API programming in general.

0 Kudos
2 Replies
Community Champion

I just do that same thing. Run it in Test or Beta first and verify it worked and then run it in production. I make sure my loops produce a log of every POST or PUT change so I can refer back to it later in case I messed something up. For some things, I usually program an "undo" script of sorts if possible. For example, our administrators create assignments for teachers to submit their lesson plans so they have to make an assignment each week. I just run a script to make those for them, but if they gave me the wrong dates or something, I'm lazy so I just have another script that deletes all assignments that have the name I used in the previous script and then I just run the first one again with the correct dates.