Bangladesh veteran Mushfiqur Rahim will retire from Test cricket after the first Test against England in Mirpur in February 2027.