Are there tools that log user actions to help reproduce bugs? [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
As a test engineer, I often engage in exploratory testing. When I encounter a bug, it is not always immediately clear which steps led to the problem. So, obviously, I have to find the required steps to reproduce the problem. Depending on the situation, this can take a large amount of time.
What would be really helpful is a logging tool that keeps track of mouse and keyboard actions and possibly also stores the properties of components that have been clicked (the AUT is written in Java).
I could simply not find a suitable tool, but maybe my search approach is erroneous.
Could anyone point me to the right direction?

This question lists tools that can be used test web applications. Some of the answers may be useful.
One for example is Selenium - a mozilla plugin that records your actions and can be replayed later.

Log4J is an apache logging tool for Java with many options for outputting logs.
The nice thing about it is that you can insert as many log messages in the code and switch them on and off based on a logging level as you see fit. So for instance, you have debug messages and info messages. if you insert some debug messages and some info messages in your code then you set the logging level to debug, then you find all debug and info messages are logged.
If you set the logging level to info then only info messages are logged. You have other levels too.
EDIT: I re-read the question and realized that I did not answer correctly...sorry. But, you could put logging statements into the actions in the Java code and accomplish the same thing that you want. It does require a recompile though.

if your testing does NOT take a whole lot of time, you can record your actions(including the whole screen) into a video. You could replay the video to see how the application responded during all your exploration.
1) http://camstudio.org/
2) google for "free screen video capture" for more.
BR,
~A

You may want to check out BB Test Assistant. I saw a very early version of this and was impressed. I've also heard good things from people who have used it since then.

In addition to #anjanb suggestion about screen capture, you can run your program under a debugger that records its execution and allows you to step back through the trace.
Omnicore CodeGuide has pretty good implementation of the concept (though you need to postprocess your bytecode). It is a commercial software but it's reasonably priced. Not sure if it's under active development though.
Another (free) product is the Omniscient Debugger which I tested a few years back and found to be inferior to GC (used too much memory, unacceptable slowdowns). Still I see on their webpage that they have made some progress so you might want to check it out.

Check out ReplayDIRECTOR: http://replaysolutions.com/
Very useful for exploratory testing, as it records all the interactions of your Java app with its surrounding environment (user input, system calls, DB responses), and allows later replay of the recorded session, with the application actually running and executing the same path through the code. The recorded inputs will be fed to the application exactly as during the recording.

There's also Session Tester:
http://sessiontester.openqa.org/
Session Tester is an exploratory testing tool for managing and recording Session-Based Testing. Session Tester has a timer so you can keep your test sessions at the desired length, and it provides an easy way to record session notes. Notes are stored in an XML format that can be converted to HTML, or be transformed into whatever form you wish.

Related

Update without Internet? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm wondering if its a normal thing and if its possible for Windows 10 to update despite the fact that there is no internet connection?
I am asking since I'm worried that the update may have erased a major portion of my code I was working on before I can save it and commit it to my repository.
Edited:
Blue update screen
What my screen look like currently:
if this PC is connected to a network with other Windows 10 PC and they are all running the Windows Update Delivery Optimization, you might get the updates without direct internet connection.
http://windows.microsoft.com/en-us/windows-10/windows-update-delivery-optimization-faq
No, that's not possible without internet connectivity - there is no magical resource where Windows updates could come from. If you haven't restarted your computer in ages then the update (the update you are experiencing is a regular windows update package, usually [that's the normal setting] downloaded automatically and without you noticing it) might have been downloaded in the past when there was connectivity and Windows now forced your computer to reboot and install the update - that's a important security feature of Windows, since inexperienced users might never reboot their computer and that way never get any security updates.
Normally, these forced reboots are announced (either a couple of minutes or 60 seconds, I'm not entirely sure) before, so you have time to save your work and finish what you are working on. I can only guess you were annoyed by "another popup" and just hit OK or some other means of disposing that notification.
In the future, you can do the following:
save to file/commit (and push) your work frequently (either save to file frequently - If the OS updates, restarts, etc... your personal files will not be affected or deleted or commit to a repository and eventually push the results to a remote like GitHub for example)
Reboot frequently (normally, you would turn your computer off at night), so you are not forced to reboot in the future. Your computer's performance will also benefit from this.
Use an IDE that automaticall saves, like IntelliJ IDEA - every time you stop typing it automatically saves the edited file to disk - you will never lose your work again.
Also, don't panick-post a not constructive question on Stack Overflow. Really, this question is objectively not constructive and you just wanted to make some air for your frustration, don't you? Chill, watch some YouTube or something while the update is installing, check whether anything is lost, and then ask a constructive question, if one results out of your situation.

Java non-event monitoring

I work for a company that has a java based eCommerce site. We have a new initiative to monitor when things aren't happening when they should be, such as guests not signing in and lack of completed orders. For example, we expect x amount of orders at y time of day and when they are below the standard deviation we want to know about this through an alerting system. We are already monitoring (the solutions we use are below) the health of the application and have a pulse on exceptions being thrown. We are looking to catch when the app appears to be in good working order, but events we expect to be triggered aren't happening. For example - our credit card authorizer could start declining all of the credit authorizing attempts so no orders are coming through, etc.
We are capable of building this ourselves, probably with Drools, but would prefer to find an out of the box solution. In our research we have not found anything that really fits what we are looking for and didn't find the functionality in we are already using. If any of the monitoring solutions we already use are capable of delivering this functionality that would be the route we would prefer.
dynaTrace
Truesite
Hyperic
Coremetrics analytics
Thank you for your help and time!
If you already have dynatrace then go with it. It can do all of what you are looking for. It can monitor your Credit Card Service and alert you in case reponse time goes down or in case it throws errors. It goes much broader than that use case - it actually tells you which end users are affected - whether this is just for certain types of users (from a certain region, from a certain type of device, ...) or if it is for everyone.
If you have questions on how to use dynatrace for your use cases I suggest you put a question on the dynatrace community forum - they are pretty active over there: https://community.compuwareapm.com/community/display/DTFORUM/dynaTrace+Forums+Home
You can also watch some of the video tutorials on youtube to make yourself more familiar with its capabilities: http://bit.ly/dttutorials

Scraping data from a java generated webpage with R [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
The Dutch government publicizes the subsidies it gives on a website:
http://www.hetlnvloket.nl/databank-eu-subsidiegegevens-2012#
However, it is not straighforward to get the data from the website. If you go to the site, choose 'Gemeenschappelijk Landbouw Beleid' (Common Agricultural Polici, the EU subsidy schedule) and press 'zoek' (zoek means 'search') at the bottom of the page you get a table from 100 entries. But I can't get it into R. It seems the page is generated with a JavaScript after you press 'zoek'.
My questions are:
How do I scrape this from the website?
How do I get the other 900 pages (there are a total of 90K records)
I asked the government to give me this data in XLS but they won't, for 'privacy reasons'. But this way nobody can check. I don't like that. ;-)
If you don't see the url change, the request is usually done via ajax, or via a post-request to the same page. In this case it is done via an ajax POST-request to a certain page with some parameters. To find out what page is loaded with what parameters, open your developer console. You can do so by right-clicking in most browsers and clicking 'inspect element', or by hitting F12. Go to the network tab and click the search button. You'll see a request in the network tab pop up. Inspect this request. You'll notice that this is a request to /pls/feed/glb2012. You can find the request parameters around there too.
As for the question "how" to scrape this. Use a programming language and your favorite scraping library. To suggest a library is out of the scope for StackOverflow.
Use a tool better suited for scraping than R. For example, Scrapy or BeautifulSoup in python, Mojolicious or Web::Scraper in perl, ... You want to scrape with a scraping tool, output data in csv (or something similarly standard), and then get it into R.
You need to figure out what the browser-server communication is exactly. The data is probably not at the url you see when you go to that page. A quick capture in Wireshark and look at the HTTP requests will show that.
It looks like, based on your level of experience (and likely, not wanting to learn new tools just for this) you probably want to have someone do it for you. Post it on elance, make sure whoever does it has done a bunch of scraping projects, it should take only a couple of hours max.
If you do want to do it, then follow scraping tutorials and cookbook examples, but remember to check the actual communication in Wireshark as you do that.

Best addon for reading data from .mp3 with JDK 1.6 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm attempting to write a music visualizer. I've looked into it and sound.sampled looks like a good library for reading the data. However, the jdk can only load .wav files. So I'm looking for a flexible addon that'll enable me to load .mp3.
The classes I'll be using are here:
http://uk.answers.yahoo.com/question/index?qid=20100125081723AAdnYzf
P.S. Lemme know if you've attempted music visualizers before.
However, the jdk..
It is not the JDK that matters, but the JRE.
..can only load .wav files. ..
It can load (a subset of) the types returned by AudioSystem.getAudioFileTypes(). If you check the docs for AudioFileFormat.Type in Java 7, you'll see a list of 5 types, but the ultimate check is what the JRE returns.
.. So I'm looking for a flexible addon that'll enable me to load .mp3.
The mp3plugin.jar of the JMF can be added to the run-time class-path to add support for MP3 decoding to JavaSound.
Lemme know if you've attempted music visualizers before.
Yup ;)
I made this wonderful starry background and thought the stars should twinkle and glow based on the music. Do you think it's possible to detect the odd instrument that's playing? Like drums or strings?
I recently broke my own player and am busy with other things, as such I'm using WinAmp to play my favorite tracks and watching some of the (300+) visualizations WinAmp offers. The reason I mention that is that my traces are of two types, 'oscilloscope' style & a 'Lissajous' style. Check the YouYube site linked above for examples of each.
WinAmp OTOH offers a plethora of seemingly quite different styles, some of which are closely tied to the music visually, and others which are entirely unrelated (just pretty animations in their own right). I figure the ones that have a linkage to the music (beyond representing the trace itself - like my software), are basing their graphics on the volume of the signal, which can then sometimes represent a beat.
The correct way to calculate the volume is to come up with a number in decibels (dB), but in my software I implemented a simpler algorithm to detect the RMS of each channel. You can see those volume bars in a Rasputina Track.
They are not especially clear in (the lower left/right of) that image, but watch the video & I think you'll find they are easier to see & offer a good basis for the 'pulsating stars' type of effect you are after (a number to multiply a basic brightness by). To get stars to twinkle differently according to frequency (e.g. bass - low, violins - high) you'd need to look to something like spectrum analysis - a Fast Fourier Transform is one way to do that.
Javazoom has a library for mp3 format.
http://www.javazoom.net/javalayer/javalayer.html
I've not used it myself. But I know others have done so successfully.
Tools for extracting instruments from a mix HAS become a reality, but I don't know if they have been realized in Java. I'm guessing it is possible but only with considerable effort and limited success at this point. One must contend with aspects of Java that make this sort of thing trickier than they might be in a "C" family language (lack of real-time guarantees: variance in garbage collection timing, thread switching).

Is it good to use printStackTrace() in swing program? [duplicate]

This question already has answers here:
Is it a bad idea to use printStackTrace() for caugt Exceptions?
(5 answers)
Closed 3 years ago.
I'm developing a small swing application, and I'm not sure if I should use the
printStackTrace().
If I get an exception I show a user via JOptionPane a message, e.g: file not found etc.
But at the same time, I'm using the printStackTrace(), I wasn't sure about neither showing the stack trace to a user nor not to print anything...just in case it would be needed.
Can I leave the printStackTrace there or why not to?
thank you for advice.
A better idea is to replace those with the use of any Logging API, like Log4J. And of course, as Paul mentioned, show the user meaningful error messages where ever appropriate.
Log stack traces to a log file they wont mean anything to the end user anyway
Print meaningful error messages to users.
i.e File not found etc
printStackTrace() contains information relevant only for the developer so it is a good practice to avoid to expose them to the user
I agree that a logging framework is a good idea for any decently sized program. That being said most users are pretty comfortable with sending in a screen shot of any errors, so, from a support perspective, it can make life easier to include (a few) extra details in any error screens.

Categories