Question about unit tests

V

Vincent Foley

Hello all,

I'm writing a small LiveJournal client, and I have a question for the
unit tests: how do I "manage" the password? To make sure that my login
method works well, I must provide the password in the test file, but
I'm not sure I'm quite comfortable with distributing my tests with that
password. Does anyone have any experience in dealing with things like
this? Do I just not distribute the tests?
 
P

pat eyler

Hello all,

I'm writing a small LiveJournal client, and I have a question for the
unit tests: how do I "manage" the password? To make sure that my login
method works well, I must provide the password in the test file, but
I'm not sure I'm quite comfortable with distributing my tests with that
password. Does anyone have any experience in dealing with things like
this? Do I just not distribute the tests?

You might try contacting LiveJournal to see if they have a test account, or
if they would be willing to create one. Another option might be to read the
password in from a non-distributed file (just make sure you document how it
works so that other testers aren't suprised.).
 
T

Tom Copeland

Another option might be to read the
password in from a non-distributed file (just make sure you document how it
works so that other testers aren't suprised.).

Yup, or from an environment variable.

Yours,

Tom
 
S

Stephan Kämper

Tom said:
Yup, or from an environment variable.

Or let the tests read it from a configuration file. YAML comes to mind..

Happy rubying

Stephan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,337
Messages
2,571,769
Members
48,561
Latest member
WileyBrant

Latest Threads

Top