|
I need to run some code only if I'm running from within the TeamCity test launcher. What's the easiest way to detect this?
Started by ripper234 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Check out this link TeamCity Test Reporting
Check if TEAMCITY_VERSION environment variable.
|
|
I'm learning how to use the Boost Test Library at the moment, and I can't seem to get test suites to work correctly. In the following code 'test_case_1' fails correctly but it's reported as being in the Master Test Suite instead of 'test_suite_1'.
Anyone...
Started by mash on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Entering test suite "Master Test Suite" Entering test suite "test_suite_1" Entering test case "test_case_1" d:/projects/cpp/....
Log_level=all will result in the following output:
Running 1 test case...
|
|
I have a dev, that will get around our code coverage by writing tests that never fail.
The code is just atrocious, but the tests never catch it because they assert(true).
I code review, but I can't do everyones work for them, all the time. How do you ...
Started by DevelopingChris on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Nester for no ....
You should have a look at doing some mutation testing , to detect weak tests.
You could always try a test to unit test.
It should be easy to detect assert(true) strings with simple grep -ping.
|
Ask your Facebook Friends
|
If you write a test class like
class MyTest < Test::Unit::TestCase def setup end def test_1 flunk end def test_1 assert true end end
the first test_1 is ignored. Although it looks like a stupid mistake, it can happen with copy and paste programming...
Started by Andrew Grimm on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
This is Ruby!, you can also do this directly in the class to create unique test methods:
class of some test method names from my most recent project:
test_should_not_do_html_escaping_for_administrators test_should_not....
|
|
How can i detect if the user is not using any of (chrome, firefox or ie) browser with js or php
Answer Snippets (Read the full thread at stackoverflow):
Var userAgent = navigator.userAgent.toLowerCase(); // Figure out what browser], Chrome: /chrome/.test(userAgent....
Here, I use this for php
here is a javascript code through which you can easily detect browser.
Browser.php
This perhaps.
|
|
I would like to detect whether the OS I'm compiling on is Windows. Is there a simple macro I can check to verify that?
Started by batty on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
You will have to do some test....
A little ..
__) // Windows stuff #endif
Sometimes it can be _WIN32 , __CYGWIN32__ , or possibly just the compiler can usually pass in the #define on the command line, like " g++ -D __WIN32__ yourfile.c ".
|
|
I have similar issues and the doctor i saw at the headache center wrote a prescription for "nasacord" (sp?). She said it is anti-inflammatory and although a steroid does not get into your blood stream. A natural alternative to try is "sinus buster" you...
Started by ihatepvc's on
, 14 posts
by 14 people.
Answer Snippets (Read the full thread at medhelp):
They did a bone marrow....
Thanks! my brother in law had lukemia.
If you can shed some light that would be great.
I had a full blood count done a couple of weeks ago and a test for glandular not be here for her.
And generally feeling unwell.
|
|
I test my application with Cucumber and it worked before I've added auto-detection of locales from WWW browser in application_controller.rb:
before_filter :set_locale private def set_locale xxx = request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first...
Started by Voldy on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can add before statement in your.
Another way is "same-same, but different".
So to make this work add a step that puts stuff fits together .
Header can be set for the duration of the request.
|
|
I've got a Win32 C++ app with a suite of unit tests. After the unit tests have finished running, I'd like a human-readable report on any unfreed memory to be automatically generated. Ideally, the report will have a stack with files & line number info ...
Started by twk on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If the numberIf you're using MSVC, Microsoft's Debug heap functions can be used to generate the report you want is destroyed (as well as adding sentinels....
Before and after each test (I think you can do it in setUp() and tearDown()).
|
|
I was wondering if there was a way within an app code to determine if the app is real (in the iTunes store) versus test? The reason is that I have every part of in app purchase resolved. However when verifying the receipt you must send it to either https...
Started by dredful on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You could have it set using some #ifdefs and the different build configurations Xcode can create.
|