When planning a survey for astronomical transients, many factors such as cadence, filter choice, sky coverage, and depth of observations need to be balanced in order to optimize the scientific gain of the survey. Here we present a software package called simsurvey for simulating the supernova lightcurves that are expected based on a survey strategy, which can then be used to determine the potential for discoveries of each strategy in question. The code is set up in a modular fashion that allows easy modification of small details of the survey and enables the user to adapt it to any survey design and transient template that they wish to use in planning their survey. As an example of its utility, we use simsurvey to simulate the lightcurve of several types of supernovae that the recently started Zwicky Transient Facility (ZTF) is expected to find and compare the results to the discoveries made during its early operations. We conclude that ZTF will find thousands of bright supernovae per year, of which about 10 could potentially be found with two days of explosion. Over the course of three years the survey will obtain lightcurves of about 1800 type Ia supernovae with z < 0.1 that can be used as distance indicators in cosmology if they are spectroscopically classified using additional telescopes. In a comparison to detections from the ZTF public survey, we found good agreement with the numbers of detections expected from the simulations.