enric jaen

Greenhorn
+ Follow
since Oct 15, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by enric jaen

A big thanks to you! I am willing to learn from Marco's experience so I can become a better estimator.
8 years ago
Hi Marco, my question is related to estimation. I wonder why do companies use agile estimations if it doesn't seem to be a good way to estimate?
Also, I am looking for job but I don't have agile experience, should I look for jobs employing agile teams? Is there any other alternative? Most job offers require agile experience.

Thanks for the book, I'll certainly like to read.
Regards,
Enric
8 years ago
Yes you have to create a csv data set (Add > Config Element > CSV Data Set Config)
11 years ago

With junit it's working for me. I extend from TestCase instead of PowerMockTestCase. Not sure if this is relevant.

11 years ago
11 years ago
My experience writting struts/spring action tests is that it duplicates acceptance tests.

I would just write acceptance tests (such as selenium) and I'd forget about action tests.

It's only my opinion, I'd like to hear what others say.
11 years ago

Example: Suppose I had a web page that when I do a click automatically brings me to my Amazon bought books.
11 years ago
I want to automatically emulate user actions within a webpage in a similar way that Selenium does, but running the scripts from inside a webpage, and using the browser itself (instead of creating a browser instance in some language).

Notice that I don't mean the Selenium IDE (which opens a new window in FF), but I mean running the test from inside a webpage.

Can anyone suggest the best way to do this?

11 years ago
Can you help me with this scenario?

short explanation

I have a servlet that receives a request from a user. The servlet then interacts with an external web on behalf the user. I would like the servlet to return at some point the current webpage and its cookies to the user so that she can continue using the external web from her browser.

sendRedirect isn't an option because the user loses the cookies, and because I don't want the browser makes a request, just show the same page that the servlet had.



long explanation

Timely the situation is:

t1)

user sends request to myservlet

browser url: localhost:8080/myservlet
browser window: <empty>
browser cookies: <empty>


t2)
servlet receives request.
servlet interacts with and external web web1Url
servlet returns web1 Html +web1 cookies to client

t3)

user receives response from servlet:

browser url: localhost:8080/myservlet
browser window: web1Html
browser cookies: web1Cookies


The problem in that at t3 is that the browser'url points to localhost, not to web1Url. I.e. what I would need at timestamp3 is something such as:

browser url: web1Url
browser window: web1Html
browser cookies: web1Cookies


sendRedirect isn't an option because it loses the web1 cookies.


Any idea how to do it?

If you need any clarification let me know.
11 years ago
It's hard to say.

Junit In Action 1st ed introduces junit and covers junit 3.8.1 and maven,
Junit In Action 2nd ed introduces junit and covers junit 4.5 and maven2
Junit recipes is based on junit 3.8.1 but contains good testing tips

Keep in mind that junit now goes in version 4.10

Maybe "Pragmatic Unit Testing in Java with JUnit (2004)" can be a good choice, but I have not read it
http://media.pragprog.com/titles/utj/contents.pdf

If you want to test with spring then:
"Spring recipes" covers junit 3 and 4 spring tests
Spring in action 2d covers also spring tests

If you want to learn TDD, read Part 1 of "Test Driven: Practical TDD.."


HTH..
11 years ago

what does obj1 references at this moment?



If you want that saveObject return this: obj1 = (Obj) controller.create(obj);

then i think you should move the line here:

11 years ago
Some books I found useful:

Spring in action, 2nd edition (appendix B)

JUnit in Action, 2nd Edition (2010)

Junit recipes (2004)

Test Driven: Practical TDD and Acceptance TDD for Java Developers (2007)



11 years ago

You could try



Assuming that your calling method first calls the get and then the set
11 years ago