Statistics collected by the Association of Test Publishers indicates that the use of pre-employment personality testing is growing by around 15% per year.
What do you need to know if a prospective employer asks you to take a test?
First of all, although it doesn't make sense to try to "game" the assessments (after all, if you misrepresent yourself, you may either be flagged by the assessments as "faking" your personality, and/or end up in a job or at an organization that isn't a good fit for you), it is helpful to know what kinds of dimensions are assessed by well established pre-employment tests.
It can also be helpful to know how these tests reflect your personality. Here is a well-established free assessment of the Big Five personality dimensions. The report will be instructive about how you come across on this kind of assessment.