Residual aberrations from manufacturing error, alignment errors, or thermal effects in a diffraction-limited instrument can mean a serious reduction in the delivered Strehl ratio and the scientific efficiency. We are developing a tool to determine the aberrations in FRIDA, a cryogenic diffraction-limited instrument in the near infrared (0.9 to 2.5 micrometers) which will receive the corrected beam of the Adaptive Optics system of the Gran Telescopio Canarias (GTCAO). FRIDA will have two operating modes: imaging and integral field spectroscopy (IFS), with an image slicer with thirty slices. GTCAO is currently designed to work independently of FRIDA. Thus, the aberrations induced by the optical components of FRIDA are outside the monitoring and control loop of the GTCAO, so there will be no correction of them. This leads to non-common-path wavefront errors (NCPE) due to the optical path difference between the adaptive optics system and the scientific detector of FRIDA. Our procedure will use only the existing hardware in the instrument cryostat, such as the H2 detector, the focusing unit, masks in the pupil-plane wheel, masks in the focal-plane wheel, and the external calibration unit, along with a new software tool. The first use of the tool will be during the laboratory alignment, testing, and acceptance procedures. At the telescope, we will use it to determine the non-common-path wavefront errors between GTCAO and FRIDA, in order to provide GTCAO with the information it needs to correct them. In this work we will present the procedure that will be applied for the evaluation of aberrations and the tool that determines the coefficients of each term of the aberrations that contribute to the degradation of the image.