This study deals with credit risk modelling and stress testing within the context of a Merton-type one-factor model. We analyse the corporate and household sectors of the Czech Republic and Germany to find determining variables of credit risk in both countries. We find that a set of similar variables explains corporate credit risk in both countries despite substantial differences in the default rate pattern. This does not apply to households, where further research seems to be necessary. Next, we establish a framework for the stress testing of credit risk. We use a country specific stress scenario that shocks macroeconomic variables with medium severity. The test results in credit risk increasing by more than 100% in the Czech Republic and by roughly 40% in Germany. The two outcomes are not fully comparable since the shocks are calibrated according to the historical development of the time series considered and the size of the shocks for the Czech Republic was driven by the transformation period.