How can I test the Air Quality?
The AQI calculation does not require that all pollutants be measured.  Instead, it uses the pollutants that are available and then uses a function (chosen by the overarching regulatory agency) that equates health risk categories to the pollutant concentrations.  The pollutant with the highest health risk (at present concentrations) will effectively determine the corresponding AQI.  See here for how the USA EPA computes their AQI.

In order to detect the most commonly monitored pollutants, you would need an ozone analyzer and a PM2.5 monitor.  This is quite expensive.  A good single-pollutant monitor will cost thousands of dollars to purchase and many continuing costs.  You will also need calibration equipment and standards.  Depending on what AQI network you will be using as a reference, the model of instrument that you use will have to meet certain specifications in order for the data to be valid.  Teledyne is an example of a company that makes equipment that would meet the qualifications for the USA AirNOW network.  You may also find of interest their nice AQI calculator.