A new tracking detector will be installed as part of the Phase-2 upgrade of the CMS detector for the high-luminosity LHC era. This tracking detector includes the Inner Tracker, equipped with silicon pixel sensor modules, and the Outer Tracker, consisting of modules with two parallel stacked silicon sensors. The Outer Tracker front-end ASICs will be able to correlate hits from charged particles in these two sensors to perform on-module discrimination of transverse momenta (p T). The p T information is generated at a frequency of 40 MHz and will be used in the Level-1 trigger decision of CMS. Prototypes of the so-called 2S modules were tested at the Test Beam Facility at DESY Hamburg between 2019 and 2020. These modules use the final front-end ASIC, the CMS Binary Chip (CBC), and for the first time the Concentrator Integrated Circuit (CIC), optical readout and on-module power conversion. In total, seven modules were tested, one of which was assembled with sensors irradiated with protons. An important aspect was to show that it is possible to read out modules synchronously. A cluster hit efficiency of about 99.75 % was achieved for all modules. The CBC p T discrimination mechanism has been verified to work together with the CIC and optical readout. The measured module performance meets the requirements for operation in the upgraded CMS tracking detector.