A specimen measurement apparatus comprising: a measurement unit configured to measure a specimen; a detector (20, 21, 22, 23) configured to detect at least one of a container (40, 42) that can store the specimen or a cap of the container; a movement mechanism including a motor and an encoder and configured to linearly move at least one of a specimen rack that holds a plurality of the containers and the detector (20, 21, 22, 23); and a controller programmed to control the movement mechanism, wherein the detector (20, 21, 22, 23) is configured to detect the containers or the caps in a state where the movement mechanism is moving the specimen rack relative to the detector (20, 21, 22, 23), characterized in that: the detector (20, 21, 22, 23) is configured to continuously perform sensing while the movement mechanism moves the specimen rack relative to the detector (20, 21, 22, 23), without temporarily stopping a relative movement between the specimen rack and the detector (20, 21, 22, 23), the controller is programmed to determine whether a position of transport by the movement mechanism is a detection position based on a signal from the encoder and store a detection result from the detector (20, 21, 22, 23) when the position of the transport is the detection position, and the specimen measurement apparatus further comprises an information obtaining unit configured to obtain information on at least one of presence or absence of the containers, or presence or absence of the caps of the containers, based on the detection result from the detector (20, 21, 22, 23) stored in the controller. a measurement unit configured to measure a specimen; a detector (20, 21, 22, 23) configured to detect at least one of a container (40, 42) that can store the specimen or a cap of the container; a movement mechanism including a motor and an encoder and configured to linearly move at least one of a specimen rack that holds a plurality of the containers and the detector (20, 21, 22, 23); and a controller programmed to control the movement mechanism, wherein the detector (20, 21, 22, 23) is configured to detect the containers or the caps in a state where the movement mechanism is moving the specimen rack relative to the detector (20, 21, 22, 23), characterized in that: the detector (20, 21, 22, 23) is configured to continuously perform sensing while the movement mechanism moves the specimen rack relative to the detector (20, 21, 22, 23), without temporarily stopping a relative movement between the specimen rack and the detector (20, 21, 22, 23), the controller is programmed to determine whether a position of transport by the movement mechanism is a detection position based on a signal from the encoder and store a detection result from the detector (20, 21, 22, 23) when the position of the transport is the detection position, and the specimen measurement apparatus further comprises an information obtaining unit configured to obtain information on at least one of presence or absence of the containers, or presence or absence of the caps of the containers, based on the detection result from the detector (20, 21, 22, 23) stored in the controller. the detector (20, 21, 22, 23) is configured to continuously perform sensing while the movement mechanism moves the specimen rack relative to the detector (20, 21, 22, 23), without temporarily stopping a relative movement between the specimen rack and the detector (20, 21, 22, 23), the controller is programmed to determine whether a position of transport by the movement mechanism is a detection position based on a signal from the encoder and store a detection result from the detector (20, 21, 22, 23) when the position of the transport is the detection position, and the specimen measurement apparatus further comprises an information obtaining unit configured to obtain information on at least one of presence or absence of the containers, or presence or absence of the caps of the containers, based on the detection result from the detector (20, 21, 22, 23) stored in the controller.