How to measure/change the Output Power of the Tx and the receiver sensitivity for nRF52840?

Hello, 

I'm currently using the nRF_SDK_15.2.0 developement kit and s140 softdevice for programming ble_app_att_mtu_throughput. I want to measure and display the output power of the transmitter and also the receiver sensitivity in dBm. My intention is to find the best values for which I can get the longest range. 

I will be more than happy to hear any other suggestions. 

Regards

Prarthana