A coil arrangement (600; 1000) for generating a magnetic field with a configurable 3D magnetic field vector (Bx1, By1, Bz1) at a predefined location inside a cavity inside the coil arrangement, the cavity being adapted for receiving a device to be tested and having an opening for allowing insertion and removal of said device, the coil arrangement comprising: - a first coil (Cz) in the form of a solenoid having a tubular shape forming or surrounding the cavity, the first coil having a first axis oriented in a first direction and being adapted for generating a first magnetic field component (Bz) in the first-direction at said predefined location; - a second coil and a third coil arranged on opposite sides of the cavity, the second and third coil having a common axis oriented in a second direction perpendicular to the first direction, the second and third coil being adapted for generating a second magnetic field component (Bx) in the second direction at said predefined location; - a fourth coil and a fifth coil arranged on opposite sides of the cavity, the fourth and fifth coil having a common axis oriented in a third direction perpendicular to the first direction and perpendicular to the second direction, the fourth and fifth coil being adapted for generating a third magnetic field component (By) in the third direction at said predefined location; characterised in that - the coil arrangement is further adapted for generating also a second configurable 3D magnetic field vector (Bx2, By2, Bz2) at a second predefined location inside a second cavity, the second cavity having a shape and size for accommodating a second device to be tested and having a second opening for allowing insertion or removal of said second device, the coil arrangement further comprising: - a sixth coil (Cz') in the form of a solenoid having a tubular shape forming or surrounding the second cavity, the sixth coil (Cz') having an axis parallel to the first direction, and being arranged between the first coil (Cz) and the fifth coil; and - a seventh coil (Cx1') and an eight coil (Cx2') arranged on opposite sides of the second cavity, each of these coils having an axis oriented in the second direction; and - at least one intermediate coil (Cym) arranged between the first coil (Cz) and the sixth coil (Cz'), the at least one intermediate coil (Cym) and the fourth coil and the fifth coil having a common axis. - a first coil (Cz) in the form of a solenoid having a tubular shape forming or surrounding the cavity, the first coil having a first axis oriented in a first direction and being adapted for generating a first magnetic field component (Bz) in the first-direction at said predefined location; - a second coil and a third coil arranged on opposite sides of the cavity, the second and third coil having a common axis oriented in a second direction perpendicular to the first direction, the second and third coil being adapted for generating a second magnetic field component (Bx) in the second direction at said predefined location; - a fourth coil and a fifth coil arranged on opposite sides of the cavity, the fourth and fifth coil having a common axis oriented in a third direction perpendicular to the first direction and perpendicular to the second direction, the fourth and fifth coil being adapted for generating a third magnetic field component (By) in the third direction at said predefined location; - the coil arrangement is further adapted for generating also a second configurable 3D magnetic field vector (Bx2, By2, Bz2) at a second predefined location inside a second cavity, the second cavity having a shape and size for accommodating a second device to be tested and having a second opening for allowing insertion or removal of said second device, the coil arrangement further comprising: - a sixth coil (Cz') in the form of a solenoid having a tubular shape forming or surrounding the second cavity, the sixth coil (Cz') having an axis parallel to the first direction, and being arranged between the first coil (Cz) and the fifth coil; and - a seventh coil (Cx1') and an eight coil (Cx2') arranged on opposite sides of the second cavity, each of these coils having an axis oriented in the second direction; and - at least one intermediate coil (Cym) arranged between the first coil (Cz) and the sixth coil (Cz'), the at least one intermediate coil (Cym) and the fourth coil and the fifth coil having a common axis.