Applying EDA on test data is wrong.
Training is the process of looking into the correct answers to create the best model. This process it not just limited to running code on training data. Using information from EDA to decide which model to use, to tweak parameters, and so forth is part of the training process and hence should not be allowed access to test data. So to be true to yourself, use test data only to check your model's performance.
Also, if you realize the model doesn't perform well during testing and then you go back to adjusting your model, then that is not good either. Instead, split your training data into two. Use one for training and another to test and tweak your model(s). See What is the difference between test set and validation set?