Persons requesting permanent residence will be required in almost all circumstances to take the "Life in the UK" test.
Once permanent residence (properly known as indefinite leave to remain) has been granted, there are no longer any immigration related restrictions on the work or business you may do in the UK, and no time limits on your stay in the UK.
The qualifying periods vary depending on your particular immigration circumstances. A common route to qualify is work related routes such as work permit, highly skilled migrants where 5 years continuous stay is the requirement. Qualifying periods can be shorter in certain circumstances and can also extend to 14 years where people have no legal right to be in the UK.
To keep your permanent residence you should not spend longer than two years outside the UK. You should maintain ties to the UK and should consider the UK as your home. If you continue to only spend short periods of time in the UK over many years it is likely that there will come a time when you will lose your indefinite leave to remain in the UK. It is therefore beneficial in most cases to apply for UK citizenship. You can normally apply for naturalisation as an UK citizen one year after being granted indefinite leave to remain and as long as you meet the residence requirements.
You are advised to seek legal advice before making these applications to ensure they are the correct application at the correct time.