Samding Dorje Phagmo The Testament of Ba was transmitted in manuscript form over many centuries, and so there are many different recensions of the text, but not one single, canonical printed version.
The author of the Scholar's Feast calls the Testament the Rba bzhed (with an 'r' prefix to the Ba clan name), and refers to 'genuine', 'impure', 'large' and 'medium' versions of the text.
[3] However, in 2009 Sam van Schaik of the British Library realised that two Tibetan manuscript fragments catalogued amongst the Chinese manuscripts of the Stein collection (and consequently previously overlooked by Tibetan scholars) preserved a section of the Testament of Ba relating to the arrival of the Indian monk Śāntarakṣita, abbot of Nalanda University, to Lhasa:[5] These two fragments came from the 'Library Cave' at Dunhuang, which was sealed in the early 11th century, and so pre-date all of the other known versions of the Testament of Ba.
[3] The text of the British Library fragments is very close to that of the Dba' bzhed manuscript discovered in Lhasa in 1997, but has some differences that suggest that it represents an earlier recension of the Testament of Ba.
Most notably, in the British Library fragments the king is concerned that the foreign monk may have brought evil spirits with him, and so Śāntarakṣita is confined in the Jokhang and interrogated for three months through an interpreter called Ananta.