Like all other Gyms in Paldea, the Cascarrafa Gym building itself is simply used for registering Gym challengers. The Gym Test and Gym battle are both conducted outside the building, with the Gym Test taking place in Porto Marinada.
Nemona will challenge the player to a battle here if it is the third, fifth, or seventh Gym the player challenges. In case of the encounters at the third and seventh Gyms, the battle will take place before the Gym Test, while with the encounter at the fifth Gym, it'll take place after the Gym battle.
Gym Test
Once the player reaches the Cascarrafa Gym, Kofu will run out of the building in a hurry, headed to the Porto Marinada auction, but without his wallet. The Gym staffer will ask the player to deliver Kofu's Wallet to him at Porto Marinada.
The Gym Test begins after the player reaches Kofu at Porto Marinada and defeats his Gym Trainer. Kofu will give the player $50,000 to make the winning bid for the legendary wakame seaweed from Hoenn; the player keeps whatever amount is not spent. After receiving the seaweed, Kofu will return to Cascarrafa to battle the player.