Usually, both reactions occur to some extent. The test will probably make it very obvious which reaction is occurring since its impossible to really know which reaction is favored.
A good hint that its an elimination reaction rather than an SN reaction will be high temperature. High temperatures are often favoring E reactions.
The solvent also gives a lot of info. In general, people/experiments use a strong BULKY base for elimination reactions. This makes the SN reaction less favored compared to the E reaction. This is a poor example, since NaOH is not a bulky base, and can go through either mechanism.
Obviously if they give you the products, it is also a lot easier to see if its an elimination or a substitution.