Life was much simpler, Way Back When. The Sword of Rhydderch Hael and the Coat of Padarn Beisrudd knew whether a man was well-born. The Cauldron of Dyrnwch the Giant and the Whetstone of Tudwal Tuglyd could distinguish the brave from the cowardly and only worked for the former. The Mantle of Tegau Gold-Breast could tell if a woman was chaste. That was about all you needed to know about people.
So when and where was Way Back When? These magical objects, among a total of Thirteen Treasures of the Island of Britain, were first recorded in late medieval times though they're invariably attributed to the British 'dark ages'. Perhaps they reflect the qualities 8th century Britons wanted to see in each other. I wouldn't be surprised to learn they belonged to the realm of fantasy fiction from the start, and represented what late medieval Britons liked to see in their knightly romances.
Nobody tells us how the magical personality tests are supposed to work or why we should believe them. I suppose to some extent they relate to potentially observable facts: a man's parents may be unknown but they are who they are, he has or hasn't behaved bravely in battle, a woman has or hasn't respected the sexual mores of her culture. All the objects had to do was sense their user's past actions. Or we might suppose a person's entire being was pure or tainted in accordance with these facts. To the right object, a pure spirit might transmit enhancing energy, while a taint would spoil its effectiveness like rot or rust. At some point, our culture certainly invented the idea that virtue can have physical effects, but for all I know, it might have been any time in the last millennium and a half.
As soon as I discovered the Magical Treasures I thought of the Hogwarts Sorting Hat in Harry Potter. The Hat reads students' personalities by magic and assigns them to one of four houses accordingly: courage (Griffindor), cleverness (Ravenclaw), loyalty (Hufflepuff) and ambition (Slytherin).
We still don't get to see how it figures out these essential traits or accumulations of past choices but at least we get to hear it thinking so we know it doesn't work by contagion from the wearer. What do we imagine the Hat senses in eleven-year olds and how? At least it listens to them, a bit like a telephathic school psychologist. I'm sure I wasn't the only adult who felt uncomfortable with the way Slytherin children were selected for 'baddy' status (no matter how many euphemisms their 'qualities' are cloaked in), then placed in a situation which reinforced negative traits.
Unfortunately their plight is the point of the exercise, because although the Sorting Hat provides colour to the British boarding school tradition of houses, it's mainly a pretext for signalling which characters are protagonists (Griffindors, with all the good qualities nominally attributed to all four houses), and antagonists (Slytherins, unpleasant). The kids in the other houses are just there as extras. By using the Hat, Rowling did run a risk of producing super-flat characters but she got round it by mostly ignoring it except to dump lots of real-world complexity squarely on its poor old rim. It's quite comical watching it struggle with borderline cases, student preferences, personality transformations and plain old mistakes. That's what happens to an old-fashioned magical personality test lost in the modern world of psychological complexity.