I have to test whether the PIC16F877A is working or not. Before we used it we test it, it is okay or not.
Yes, the tests environmental as well as operational..
To fully test the device operationally, you should test each peripheral module, ADC, USART, Timers, Comparators, etc.
A test "jig" board which can provide various analog and digital stimuli combined with test results transmitted through a serial connection to a monitoring PC is an option.
The devices program can be designed to manipulate the various stimuli inputs recording the results as the test progresses.
Environmental testing requires subjecting the device to both its stated temperature range and operational voltage range while running the above tests.
This is usually performed with a test "jig" board which can be mounted in an environmental chamber where temperature and humidity can be precisely controlled.
However, you'll most likely need to utilize a freezer and oven which provide adequate control over the temperature levels.
It all depends on how well you need to test the device and compare your findings to the devices datasheet.
BigDog