A computer-implemented method for modeling a sensor, in particular an FMCW LiDAR sensor for distance measurement, in a virtual test environment, wherein: a simulation model is defined, wherein the simulation model comprises a virtual sensor and the virtual test environment, wherein in the method: a virtual transmission signal sent by the virtual sensor is simulated in the virtual test environment; it is determined whether the virtual transmission signal impacts a virtual object at a point of impact in the virtual test environment; in the event of a positive determination, a distance of the virtual transmission signal covered by the virtual sensor up to the point of impact is calculated in the virtual test environment; and at least one output value of the virtual sensor is determined based on the calculated distance, wherein the determination of the output value further takes place based on at least one parameter of the simulation model, wherein the parameter and/or the output value is/are modeled by a probabilistic distribution, wherein the parameter comprises an azimuth angle of the virtual transmission signal and/or an elevation angle of the virtual transmission signal, wherein the virtual transmission signal is simulated, in particular only, based on the azimuth angle, the elevation angle and a starting point of the virtual transmission signal, wherein the method further comprises that: the azimuth angle and elevation angle of the virtual transmission signal are modeled as an expected value by a probabilistic distribution with a predefined reference azimuth angle and a predefined reference elevation angle; a plurality of different virtual auxiliary transmission signals, whose azimuth angle and elevation angle differ from the reference azimuth angle and reference elevation angle, are selected based on the probabilistic distribution of the virtual transmission signal; for each virtual auxiliary transmission signal, it is determined whether the virtual auxiliary transmission signal impacts the virtual object at the point of impact and/or impacts at least one further virtual object at at least one further point of impact; in the event of a positive determination, a distance of the virtual auxiliary transmission signal covered by the virtual sensor up to the point of impact is calculated in the virtual test environment; and a final distance value is determined based on the plurality of calculated distance values. a virtual transmission signal sent by the virtual sensor is simulated in the virtual test environment; it is determined whether the virtual transmission signal impacts a virtual object at a point of impact in the virtual test environment; in the event of a positive determination, a distance of the virtual transmission signal covered by the virtual sensor up to the point of impact is calculated in the virtual test environment; and at least one output value of the virtual sensor is determined based on the calculated distance, wherein the determination of the output value further takes place based on at least one parameter of the simulation model, wherein the parameter and/or the output value is/are modeled by a probabilistic distribution, wherein the parameter comprises an azimuth angle of the virtual transmission signal and/or an elevation angle of the virtual transmission signal, wherein the virtual transmission signal is simulated, in particular only, based on the azimuth angle, the elevation angle and a starting point of the virtual transmission signal, wherein the method further comprises that: the azimuth angle and elevation angle of the virtual transmission signal are modeled as an expected value by a probabilistic distribution with a predefined reference azimuth angle and a predefined reference elevation angle; a plurality of different virtual auxiliary transmission signals, whose azimuth angle and elevation angle differ from the reference azimuth angle and reference elevation angle, are selected based on the probabilistic distribution of the virtual transmission signal; for each virtual auxiliary transmission signal, it is determined whether the virtual auxiliary transmission signal impacts the virtual object at the point of impact and/or impacts at least one further virtual object at at least one further point of impact; in the event of a positive determination, a distance of the virtual auxiliary transmission signal covered by the virtual sensor up to the point of impact is calculated in the virtual test environment; and a final distance value is determined based on the plurality of calculated distance values. the azimuth angle and elevation angle of the virtual transmission signal are modeled as an expected value by a probabilistic distribution with a predefined reference azimuth angle and a predefined reference elevation angle; a plurality of different virtual auxiliary transmission signals, whose azimuth angle and elevation angle differ from the reference azimuth angle and reference elevation angle, are selected based on the probabilistic distribution of the virtual transmission signal; for each virtual auxiliary transmission signal, it is determined whether the virtual auxiliary transmission signal impacts the virtual object at the point of impact and/or impacts at least one further virtual object at at least one further point of impact; in the event of a positive determination, a distance of the virtual auxiliary transmission signal covered by the virtual sensor up to the point of impact is calculated in the virtual test environment; and a final distance value is determined based on the plurality of calculated distance values.