Testbeam studies of barrel and end-cap modules for the ATLAS ITk strip detector before and after irradiation