ReSharper - browser test page session not lasting - unit-testing

All my QUnit tests run okay with ReSharper, but QUnit's generated page will be shown only once. The session will be gone at page reload or even after trying to filter the tests in the filter options (Chrome gives me ERR_CONNECTION_REFUSED). "Save and restore Unit Test Sessions" is marked.
Does this have something to do with the tests always running in a different port? I wanted the page to stay where it is for later use, but I can't figure out how to do it. How do I make the session last without the connection being refused after a page reload?

Related

facing a weird bootstrap behavior in chrome

I have a django-bootstrap project in which an html page has a dynamically generated table with data-toggle popovers on td elements. in firefox, opera and edge everything works perfectly fine and the popover show up, but in chrome they just don't. however when I copy paste the same code in a new blank html test page unrelated to the project it works (minus a few css issues for the rest of the page).
am really out of my wits end trying to understand the behavior I tried:
emptying cache and hard reload multiple time no success
forcing the state to trigger popover no success
no errors/warnings showing up in console
restart server and dev machine no success
clear a week's worth of cache and browser history
check if there is a chrome extension blocking it. (none am aware of since the test page is working fine)
made sure my jquery bootstrap 4 cdn's are up to date
I really have no clue what to turn to to find the source of the behavior. what steps do you do you guys go through if an element is randomly not showing on your page or you going through unexpected behaviors

Coded UI Test and Firefox 35.0.1 Issue

I'm trying to use microsoft coded ui tests with firefox. This was NOT an issue until Firefox 35.0.1 came out.
Skip to the bottom if you want to know the issue more than the why am I doing it this way:
Why I'm not using Selenium:
With Selenium, when Firefox launches a web driver, it loses it's previous states/cookie settings. I could of course import a cookie. The problem is that if I have multiple users running the test, they'd either have to set up individual lines of code to import their own specific cookie from their own path. This could become a dangerous game if a user decides to use someone elses cookie.
Why I'm using Coded UI Tests:
Certain applications I am running work exclusively with IE and others work exclusively with Firefox. Since I can't record the instances in IE with selenium, I have to should utilize a coded ui test anyway. I could of course also use watin. But at some point, why run Selenium, and watin when I can instead JUST use a coded ui test. Additionally, when going to the url for login with a coded ui test, FF is setup to save my password and cookie. therefore, the user can save their own password/cookie on each machine and just change the input for username which comes via excel spreadsheet. Everyone gets their own test, and no security issues.
The issue:
Since Coded UI tests don't recognize Firefox as a browser, it recognizes Firefox as a windows application. Therefore, edits and buttons in firefox are considered WinEdit and WinButton for firefox while internet explorer uses HtmlEdit and HtmlButton.
When Firefox put out an update, the coded ui test stopped recognizing certain objects in the firefox window. When trying to manually highlight objects/words with the test builder, it puts the blue box at the head of the web page instead of over what I'm clicking selecting. When hardcoding things to select, it doesn't recognize them. Is anyone aware of a workaround for this issue?
Recording on Firefox/Chrome is not supported by Coded UI. You can record your test in IE and Play it across Firefox/Chrome using Selenium components for Coded UI Cross Browser Testing which can be found here https://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d

Django Not Reflecting Changes Made to App

I've written an app and have been testing it within a project. Any change I make to the project is reflected immediately. But when I make a change to the app and run the install script again, none of the changes are shown. I even look at the files in the site-packages directory and see that the change has been installed.
I've tried clearing the browser cache, restarting the browser, trying a different browser, shutting down and restarting the django server, re-sourcing the virtual environment, setting $PYTHON_PATH, and even restarted my system to no avail.
This has happened just recently, within the past hour. I was able to make django reflect the changes when I set $PYTHON_PATH and, afterword, re-sourcing the virtual env. But now that won't work, either.
I keep thinking it's a caching issue, but I'm not seeing anything on the django cache that would cause this problem.
I'm using lighttpd as the server backend if that's an issue.
If your using google chrome:
Open your site to the page where the changes are not reflecting.
press f12 to open inspect window, the developer tool in chrome.
Now left click on the reload button for a longer duration continuously, about one second long.
You will get three options Go for empty cache and hard reload in this case.
Done!

preventing Selenium test database from being deleted in Django between tests

Using Selenium within Django I'm trying to run 2 acceptance tests on my django app. The first test registers a new user of my app, the second one logs that user in to the system and tries to perform an action. However, when running the tests, between the first and second tests, the user is erased from the database. It seems the database is wiped between each test. All the documentation I have seen indicates this isn't supposed to be happening.
How can I prevent this from occurring?
Note: Both the setUpClass and tearDownClass methods of my Test Class have #classmethod decorators. Also, the browser doesn't close between the two tests running.

howto hide firefox add-on popup initiate by selenium rc?

everytime i test my selenium test, the instant of firefox will popup and show page of selenium rc. It's ok and cool. But i have problem. For every test i also have to see a firefox's page pop up and shown selenium plugin have been add to firefox.
is there any way to configure selenium so it initiate firefox without a popup page cause after a hundred test, it start to irritate me ;D
I'm sure this is a duplicate of another SO question, as I feel like I've answered it before, but I can't find it. If I do subsequently find it then I will update my answer.
You need to set the extensions.lastAppVersion preference to match the version of Firefox that you're launching. Otherwise you will generally have an additional tab in Firefox and the Addons manager popup.
You may need to configure Selenium to use a custom Firefox profile in order to make this change.
Removing the extensions.rdf file from profile directory will fix this issue . I have created a separate profile for Selenium tests, which is only used for Selenium Tests. I would love to hear if there is other way around . My "extensions.lastAppVersion" is updated and reflects the current browser version therefore the above trick does not work for me .
Remember, invoking selenium by user will re-create extensions.rdf file, therefore I prefer to keep separate profile for Selenium
Having found this answer and had a go, I found that merging the Extensions.rdf and extensions.ini file from the temporary profile created in a Selenium session and putting that into your Custom Profile directory solves this problem.
When merging extensions.ini, be careful to avoid getting the pathnames wrong.
Use this -
From the address bar type “about:config” and add/update the following:
- extensions.update.notifyUser (type=boolean; value=false)
- extensions.newAddons (type=boolean; value=false)
It worked for me.