Test can be 考試 or it can be checking to see if something works/what will happen (the same as "experiment", but maybe quicker and less formal). There's also tests in medical context. For example: When I go back to university, I will have to get a Covid-19 test every week.
Experiment is a type of test usually performed in a lab setting in school or research and usually follows a formal set of procedures.
Within an experiment, there are many trials (individual tests). Besides scientific trials, there are also legal/court trials (I think it is 審判 in Chinese)
Hope this makes sense. Let me know if you have any questions.