A method for testing an ignition device associated with a cylinder of an internal combustion engine, the ignition device being configured to supply a pilot injection of liquid fuel to the cylinder to cause an ignition of a mixture of gaseous fuel and air in a combustion chamber of the cylinder, the method comprising: operating the internal combustion engine with a first pilot injection timing (ti) of the ignition device, the injection timing being the timing of the start of injection of the pilot fuel by the ignition device; retarding the pilot injection timing to operate the internal combustion engine with a second pilot injection timing (t 2) of the ignition device that is later than the first pilot injection timing; measuring at least one combustion parameter while operating with the second pilot injection timing, the at least one combustion parameter being obtained based on measurements performed with a cylinder pressure sensor system provided for the engine and being at least one of: a start of combustion in the cylinder, a peak firing pressure in the cylinder, a duration of combustion and a cylinder pressure measured at a predetermined timing before or after a main injection timing; advancing the pilot injection timing to operate the internal combustion engine with a third pilot injection timing (t 3) of the ignition device that is earlier than the first pilot injection timing; measuring the at least one combustion parameter while operating with the third pilot injection timing; comparing the measurement of the at least one combustion parameter for the second pilot injection timing (t 2) with the measurement of the at least one combustion parameter for the third pilot injection timing (t 3); and determining whether the ignition device is functional based on the comparison. operating the internal combustion engine with a first pilot injection timing (ti) of the ignition device, the injection timing being the timing of the start of injection of the pilot fuel by the ignition device; retarding the pilot injection timing to operate the internal combustion engine with a second pilot injection timing (t 2) of the ignition device that is later than the first pilot injection timing; measuring at least one combustion parameter while operating with the second pilot injection timing, the at least one combustion parameter being obtained based on measurements performed with a cylinder pressure sensor system provided for the engine and being at least one of: a start of combustion in the cylinder, a peak firing pressure in the cylinder, a duration of combustion and a cylinder pressure measured at a predetermined timing before or after a main injection timing; advancing the pilot injection timing to operate the internal combustion engine with a third pilot injection timing (t 3) of the ignition device that is earlier than the first pilot injection timing; measuring the at least one combustion parameter while operating with the third pilot injection timing; comparing the measurement of the at least one combustion parameter for the second pilot injection timing (t 2) with the measurement of the at least one combustion parameter for the third pilot injection timing (t 3); and determining whether the ignition device is functional based on the comparison.