An image forming apparatus comprising: a) a rotatable photosensitive member; b) a charging roller configured to electrically charge said photosensitive member; c) an exposure device configured to expose said photosensitive member charged by said charging roller to light to form an electrostatic latent image; d) a developing device configured to develop the electrostatic latent image into a toner image by depositing toner on the electrostatic latent image formed on said photosensitive member; e) a transfer member configured to transfer the toner image onto a recording material; f) a fixing device configured to fix the transferred toner image on the recording material; g) a discharging portion configured to discharge the recording material on which the toner image is fixed; h) a voltage source configured to output a charging voltage applied to said charging roller, the charging voltage being in the form of a DC voltage biased with an AC voltage; i) a voltage setting portion configured to set the charging voltage outputted from said voltage source; j) an executing portion configured to control an output process including forming a plurality of adjusting images under control of said voltage setting portion with differently set values of peak-to-peak voltage of AC voltages, respectively, while a value of the DC voltage is set at a predetermined value common to the adjusting images and configured to control the execution of the output process of a test chart including the adjusting images by controlling said discharging portion; and k) an inputting portion through which an instruction of execution of the output process of the test chart is inputted, characterized in that in a case where the instruction is input via the inputting portion, during non-image formation the executing portion is configured to apply different peak-to-peak voltage of AC voltages to the charging roller and charge the photosensitive member, execute a detection operation of detecting a value of an alternating current flowing between the charging roller and the photosensitive drum when the photosensitive drum is charged and determine a reference peak-to-peak voltage of AC voltage corresponding to a target discharge current value during an image formation based on a detection result of the detection operation, and during image formation the executing portion is configured to set the values of peak-to-peak voltage of AC voltages to be applied to the charging roller based on the detection result of the detection operation while the adjusting images are formed in the execution of the output process, wherein at least one adjusting image is formed by the peak-to-peak voltage of AC voltage higher or lower than the reference peak-to-peak voltage of AC voltage and one adjusting image is formed by the peak-to-peak voltage of AC voltage equal to the reference peak-to-peak voltage of AC voltage. a) a rotatable photosensitive member; b) a charging roller configured to electrically charge said photosensitive member; c) an exposure device configured to expose said photosensitive member charged by said charging roller to light to form an electrostatic latent image; d) a developing device configured to develop the electrostatic latent image into a toner image by depositing toner on the electrostatic latent image formed on said photosensitive member; e) a transfer member configured to transfer the toner image onto a recording material; f) a fixing device configured to fix the transferred toner image on the recording material; g) a discharging portion configured to discharge the recording material on which the toner image is fixed; h) a voltage source configured to output a charging voltage applied to said charging roller, the charging voltage being in the form of a DC voltage biased with an AC voltage; i) a voltage setting portion configured to set the charging voltage outputted from said voltage source; j) an executing portion configured to control an output process including forming a plurality of adjusting images under control of said voltage setting portion with differently set values of peak-to-peak voltage of AC voltages, respectively, while a value of the DC voltage is set at a predetermined value common to the adjusting images and configured to control the execution of the output process of a test chart including the adjusting images by controlling said discharging portion; and k) an inputting portion through which an instruction of execution of the output process of the test chart is inputted,