We present the performance of a full-length prototype of the ALICE Forward Calorimeter (FoCal). The detector is composed of a silicon-tungsten electromagnetic sampling calorimeter with longitudinal and transverse segmentation (FoCal-E) of about 20X 0 and a hadronic copper-scintillating-fiber calorimeter (FoCal-H) of about 5λ int. The data were taken in various test beam campaigns between 2021 and 2023 at the CERN PS and SPS beam lines with hadron beams up to energies of 350 GeV, and electron beams up to 300 GeV. Regarding FoCal-E, we report a comprehensive analysis of its response to minimum ionizing particles across all pad layers, employing various operational modes including different pre-amplifier and bias voltage settings. The longitudinal shower profile of electromagnetic showers is measured with a layer-wise segmentation of 1X 0. As a projection to the performance of the final detector in electromagnetic showers, we demonstrate linearity in the full energy range, and show that the energy resolution fulfills the requirements for the physics needs. Additionally, the performance to separate two-showers events was studied by quantifying the transverse shower width. Regarding FoCal-H, we report a detailed analysis of the response to hadron beams between 60 and 350 GeV. The results are compared to simulations obtained with a Geant4 model of the test beam setup, which in particular for FoCal-E are in good agreement with the data. The energy resolution of FoCal-E was found to be lower than 3% at energies larger than 100 GeV. The response of FoCal-H to hadron beams was found to be linear, albeit with a significant intercept that is about factor 2 larger than in simulations. Its resolution, which is non-Gaussian and generally larger than in simulations, was quantified using the FWHM, and decreases from about 16% at 100 GeV to about 11% at 350 GeV. The discrepancy to simulations, which is particularly evident at low hadron energies, needs to be further investigated.