Run a test with a specific seed passed as argument in command line

2,595 views
Skip to first unread message

Degletagne Aurelie

unread,
Oct 7, 2014, 9:30:28 AM10/7/14
to googletes...@googlegroups.com
Hi,

I run a test with random values generated with a given seed. When a test fails, I wanted to reproduce the test with the seed in question by passing the seed as argument in command line.
How can I pass the seed in command line argument and then get seed value in my test ?

Thanks in advance,

Aurélie

Josh Kelley

unread,
Oct 7, 2014, 8:49:52 PM10/7/14
to Degletagne Aurelie, Google C++ Testing Framework
The wiki explains how to use the --gtest_random_seed option at https://code.google.com/p/googletest/wiki/AdvancedGuide#Shuffling_the_Tests.  Does that answer your question?

--
Josh Kelley

--

---
You received this message because you are subscribed to the Google Groups "Google C++ Testing Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages