Automatic web tester for 404 links? - web-testing

Is there any test framework or software that can automatically go through a site and find 404 errors from links?

You could use an extension for your favourite browser, i.e. LinkChecker for Firefox.

Are you looking for a tool that does complete validation/checking of the site? Or one that does use-case testing of specific parts of the site.
For the latter I recommend TestPlan, it has the ability to check the headers of pages and work with the so-called "meta" response of the page.
The original web-site is no longer available but the project is now hosted on Launchpad.
For the former it isn't the best tool, but as part of a test framework it is easy enough to get it to scan through links on the site looking for errors.

If you're running on Windows there is this one.

Related

How to reverse engineer a progressive web app ?

I found this free PWA https://www.the-qrcode-generator.com and now wonder how I could do one such myself.
Since I couldn't find any access to its source code I wondered if it'd be difficult to reverse engineer.
I'm interested in building a PWA with QRCode functionality.
This one was created with AngularJS v1.3.20. You can find the source in your console windows under Sources tab. You can easily beautify the code inside the window to make it readable.
If you want to know how they organized their rest API, the browser network tab will help a lot, just filter by XHR and examine all the call from the front end to be.
The front end is very hard to revers engineer, because most sites are served as minified bundles, so you can't see the original code.
You can however find some other information about what they used to build it, for example in the html source you can see some ng-* tags, which indicates that this is angular, you can also see that body has attribute data-ng-app meaning this is angularjs and so on.
For the QR logic you can see that there are no back end calls, meaning that it is written entirely in the client. I would search for already available solutions for that.

Can I embed source files from GitHub on my web page other than Gists?

Context
You can create a Gist on GitHub and embed it on your web page: embedding Gists.
This is an example of a randomly chosen Gist: tap.groovy.
Question
Is embedding also possible with other code files from GitHub, for example with this randomly chosen C# file ICommand.cs which is not a Gist?
You can try https://emgithub.com, which does exactly what you want.
To embed the example file ICommand.cs in your question, you can just add "em" before "github.com" in the address bar, then press Enter.
Then you can get a script tag like this:
<script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2Fdotnet%2Fcorefx%2Fblob%2Fmaster%2Fsrc%2FSystem.ObjectModel%2Fsrc%2FSystem%2FWindows%2FInput%2FICommand.cs&style=default&type=code&showBorder=on&showLineNumbers=on&showFileMeta=on&showCopy=on"></script>
Note if you simply click Run code snippet in StackOverflow, the copying button at top right corner may not work. Running it outside SO would work fine.
Unlike other websites that do similar work, EmGithub.com is a static site hosted on Github Pages. Fetching target files and highlighting are done on your browser.
Disclosure: I'm the developer of it :)
You can use https://gist-it.appspot.com/:
<script src="http://gist-it.appspot.com/https://github.com/dotnet/corefx/blob/master/src/System.ObjectModel/src/System/Windows/Input/ICommand.cs"></script>
There's a standard for embedding content from one website in another via a URL, called oEmbed. Unfortunately, GitHub is not a oEmbed provider, i.e. it doesn't support oEmbed for its URLs.
I found a proxy service, Oembed Proxy for GitHub,
which adds oEmbed support for GitHub's code URLs. You pass a GitHub URL as a parameter to the proxy's URL and a resulting URL can be be pasted in another website, assuming that website supports embedding oEmbed links.
Another obstacle is that not every website supports embedding oEmbed URLs. According to the proxy's documentation, notion is one website that supports them. I did some research and looks like it should be possible to add oEmbed support to e.g. wordpress or jekyll.
This answer provides a very limited solution, due to small adoption of oEmbed. I thought it would be worth to spread the word nonetheless.
Another possible service is https://github.com/finom/github-embed. It seems to be unmainted by now for about 2 years, but gist-it seems to be unmaintained for even 6 years. I've tried neither, though.
You can use gistYard
<iframe src="https://gistyard.piyushdev.xyz/emd.html?lang=&from=0&to=&code=https://raw.githubusercontent.com/dotnet/corefx/master/src/System.ObjectModel/src/System/Windows/Input/ICommand.cs&edit=true&dm=off" width="100%" height="330" frameborder="0"></iframe>
It provides features like changing theme , cutting code directly from raw , edit mode , custom styling and others.

deleting page version numbers in form action URLs in wicket for stress testing purposes

I want to stress test a system based on Apache Wicket, using grinder.
So what I did was that I used grinder's TCP Proxy tool to record a test session in my Application and then fed the generated test script to grinder to stress test the system; but we found out the tests aren't carried out successfully.
After a lot of tweaking and debugging, we found out that the problem was within the wicket's URL generation system, where it mixes the page version number into its URLs.
So I searched and found solutions for removing that page version number from the URLs (Like this), and used them and they worked and removed those version numbers from the URLs used in the browser. But then again, the tests didn't work.
So I inspected more and found out that even though the URLs are clean now, the action attribute of forms still use URLs mixed with page version number like this one : ./?4-1.[wicket-path of the form]
So is there anyway to remove these version numbers from form URLs as well? If not, is there any other way to overcome this problem and be able to stress test a wicket web application?
Thanks in advance
I have not used grinder, but I have successfully load-tested my wicket application using JMeter Proxy; without changing Wicket's default version mechanism.
Here is the JMeter step-by-step link for your reference:
https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf
Basically, all I did was running proxy server to accept web requests from the browser to capture the test scenarios. Once done collecting the samples, then change the target host url to whichever server you want to point to (other than your localhost).
Alternatively, there is another load testing tool BlazeMeter (compatible with JMeter). You could add the chrome browser plugin for quick understanding.
Also, you might want to consider mounting your packages to individual urls for 'cleaner' urls. That way, you have set of known urls generated for pages within same package (for example, /reports for all the reports pages within reports package).
Hope this helps!
-Mihir.
You should not ignore/remove the pageId from the urls. If you remove them then you will request a completely new instance of the page, i.e. you will lose any state from the original page.
Instead of using the href when recording you need to use the attribute set (by you!) with org.apache.wicket.settings.DebugSettings#setComponentPathAttributeName(String).
So Grinder/JMeter/Gatling/... should keep track of this special attribute instead of 'href' and later find the link to click by using CSS/XSLT selector.
P.S. If you are not afraid of writing some Scala code then you can take a look at https://github.com/vanillasource/wicket-gatling.

Adding to the browser user agent string?

I have a plug-in that handles its own url schema (something like mystuf:// ). If a user clicks on such a link when the plug-in isn't installed (s)he gets an ugly error. So I extended my installer to write into the Registry (for Internet Explorer) and the user.js (for Firefox) to ADD a custom string to the user agent string. These additions survive a browser upgrade nicely (Microsoft uses this technique to indicate the presence of the dotNet Framework).
Now I need to extend this to Apple Safari and Google Chrome on all supported platforms.
To be clear: I'm not looking how to REPLACE the user agent string, but how to amend it with additional information.
Any hint?
I faced a similar problem and I implemented this in the same way as apple do for iTunes as described in this SO question. Finding information on how to create the Firefox plugin was more tricky, but the answer to my question was a great help. The Firefox (or mozilla) plugin will be used by all mozilla based browsers (Firefox, Chrome, Safari) and you will therefore be able to use the same javascript to detect the firefox plugin in all of these browsers and therefore determine whether your plugin/custom protocol/application is installed.
As Google Chrome supports the Netscape Plugin API ( http://en.wikipedia.org/wiki/NPAPI ), the Firefox way might be a good starting point also there.

Media Sharing CMS Site

We are trying to build a media sharing site. I want to use existing commercial or open source frameworks if they are available.
I saw some sites like:
http://www.phpmotion.com/
http://www.jamroom.net
http://www.clip-share.com/
http://www.videoscript.us
http://www.vidiscript.com/
http://www.alstrasoft.com/videoshare.htm
Are there any good open source (or) commercial packages that I am missing out? I want the media site to stream normal as well as HD content and integrate with a payment gateway when the user wants to view HD.
I am the primary developer of Jamroom (http://www.jamroom.net) - while Jamroom is a commercially licensed system, it is "open source" in the fact that we do not encrypt the PHP code in any way, and our license allows for full modifications to suit your needs.
Let me know if you have any questions and I can follow up. Thanks!
Brian
I will research your listed sites. i will come back with good one.
There is available one more [video sharing script: http://www.rayzz.net/index.php][1]