See http://www.ebusiness-unibw.org/wiki/Makerlab/Guides/PyVISA for context.
As a first example, we are going to discharge a battery by a connecting a small light bulb or a sufficiently rated resistor and measure the decreasing cell voltage over time. In this example, we only have to control a single measurement device, in this case a digital voltmeter.
Task: Measure the discharge curve for a Duracell QU1500 AA battery at 200 and 500 mA and compare it with the datasheet.
Do not use rechargeable batteries, namely not Lithium-based batteries. They can develop very high discharge currents that can cause fires and other hazzards.
When using a resistor care must be taken to choose a sufficient power rating.
Example: When you use a 1.5 V AA battery, you need a resistor of R1=1.5 V / 0.2A = 7.5 Ohms and of R2=1.5 V / 0.5A = 3 Ohms. The 7.5 Ohms resistor needs to be rated P = 1.5V * 0.2A = 0,3 W and the 3 Ohms resistor needs to be 1.5V *0.5A = 0.75 W. Both values are available in the E12 series of values, and you should use a 1 W version to be on the safe side.
The resistor can get hot even within its power rating. Handle with care!