How to script automatic actions on web? - scripting

Its a very general question:) For example I want to be able to automatically check if a page was updated, or to make some daily action online... Where would I start with that? Which languages/programs could be used?

I would go with this awesome Groovy library - Geb.

I use this tools too. I like Geb! But you can try Java + Selenium.
You choice depends on the task you need to do and understand the approach the tool for you or not.

Related

Selenium IDE login twice

I have to input credentials and log in into page twice by using Selenium IDE. How can I do it by using if-else statement? Is there any way to do this?
You can. But your question is quite vague. Maybe you could post your code? Learn about control flow (if-else, forEach, etc.) here.
Another possible solution could be to use the recording feature of Selenium IDE. This article shows you how to create a login test.

How does Safari's reader feature work?

I want to add a similar feature to a tool I'm making. I'm interested in how it works code-wise. I want to be able get an html page and exclude all but the article.
The Readability project does something similar for chrome and iOS. I'm not sure how it detects the content automatically but I know that Readability has an API for people who want to integrate it's features. You might want to check that out.
http://www.readability.com/learn-more
If you're working with Ruby, you could use Pismo. It extracts an article from a given document.

anyone know of a shared To-do list plugin for eclipse

Does anyone know of shared TODO list plugin for Eclipse that allows users in a a development team to all view and edit the same list of tasks?
Mylyn can be used to integrate issue tracking systems into the IDE.
It does this by making tasks a first class part of Eclipse, and integrating rich and offline editing for repositories such as Bugzilla, Trac, and JIRA.
If you are not looking for a lightweight solution, then you might give it a try.
Other than the already built-in "Tasks"? It works by adding TODO, XXX or FIXME (in caps) in comments in the source code. I think this works pretty good and we use it at work all the time.
I don't know about such particular plug-in, but maybe that you could take a look to what the Communication framework or the Mylin feature offer you in term of collaborative work.
If you want to track a TODO-list among a couple of developer, you really want to use a issue-tracking system such as Bugzilla, Trac, or Jira. As soon as you've started to add tasks to it, you'll want features such as sorting on different fields, different kinds of views, etc.
That said, Mylyn is the best way to integrate it into Eclipse.
Ive just installed a plugin called fasttrack which is just the kind of thing I was looking for. Works best with SVN, but you can also use it with CVS.

Easy acceptance testing with specification

I look for a tool/framework to make automatic acceptance-testing. The interface to create new tests should be so easy, that a non-programmer (customer, boss) will be able to add specifications for which will be tested automatically.
It should be some way to execute the tests from command-line, to include a run of the tests in automatic builds.
I prefer Java and Open-Source, but my question isn't restricted in that way.
What do you can recommend and please explain why your tool/framework is the best in the world.
http://fitnesse.org/ appears to meet all of the qualifications you want. It is one I have used with success.
I think that several of the options are very good and you should test them to see which fits your team :
Cucumber (Ruby)
Fitnesse
Robot framework (Python/Java)
Behave for Java
SpecFlow (.net)
Another framework you may want to look at is Robot Framework. To see how test cases look like, take a look at the Quick Start Guide.
I've found a framework named Concordion that may fulfill my needs.
What you ask for appears to be for a very well-defined system with a very specific sets of inputs and a high degree of automation built-into the system or developed for your system.
Commercial applications such as HP Quick Test Pro isn't non-technical enough and requires an additional framework such as one from Sonnet, which is a step in the right direction, but neither is open source or java-based.
Even with a framework in place, it's quite a bit of work to make this work in an automated way. I'd like you to consider the time needed to develop the framework vs the time to manually run these tests and verify that you are using your time well.
How about Cucumber:
Feature: Acceptance testing framework
Scenario: an example speaks volumes
Given a text example
When it is read
Then the simplicity will be appreciated
You would need a developer to discuss with the boss what each of those lines really means and implement the step definition to drive it:
Given /^a text example$/ do
file.open("example.txt", "w") { |file| file.write "text example" }
end
When /^it is read$/ do
SystemUnderTest.read("example.txt")
end
Then /^the simplicity will be appreciated$/ do
SystemUnderTest.simplicity.should be_appreciated
end

What is a good markup language to use for tests?

I'm writing a tool to run a series of integration tests on my product. It will install it and then run a bunch of commands against it to make sure its doing what it is supposed to. I'm exploring different options for how to markup the commands for each test case and wondering if folks had insight to share on this. I'm thinking of using YAML and doing something like this (kinda adapted from rails fixtures):
case:
name: caseN
description: this tests foo to make sure bar happens
expected_results: bar should happen
commands: |
command to run
next command to run
verification: command to see if it worked
Does anyone have another, or better idea? Or is there a domain specific language I'm unaware of?
Go and have a look at the XUnit suite of test tools. This framework was originally designed for Smalltalk by Kent Beck and, I think, Erich Gamma, and it has now been ported to a whole stack of other languages, e.g. CUnit
You might want to check out CPAN. It does for Perl scripts exactly what it sounds like your utility will do for your app.
Did you take a look at RSpec?