Enterprise Java Development@TOPIC@

Chapter 28. Project 3 Testing

Note

The end-to-end scenario will test your end-to-end application in a "happy path" scenario. Any white-box or black-box testing of alternate and error paths would be appropriate to put in the separate unit and IT test cases.

  1. Provide JUnit IT tests that verify the EJB functionality of eLeague accessed through its remote interface using new access control restrictions. The test should demonstrate that authentication and access control is in place for this EAR-based deployed application, the authenticated identity of the caller can be accessed by the server-side code, and status of the call is properly conveyed to the caller. For both RMI and JAX-RS, there should be:

  2. Provide JUnit IT tests that verify the EJB functionality of eClub using its new access control restrictions and ability to authenticate (if necessary) with eLeague. The test should demonstrate that authentication and access control is in place for this WAR-based deployed application. This is similar to above -- except must be demonstrated with eClub.

  3. Provide a JUnit IT tests that demonstrates the functionality of the JavaEE interceptor/validator. This should include:

  4. Implement the scripted use case below as an automated JUnit test and a selected portion manually accessed through the Web UI. The JUnit test/module must be delivered in a state that can be executed in a debugger -- whether directly within Eclipse (ideally) or using a remote debugging session to a Maven command-line build.

    Since this end-to-end test spans both applications the most likely place to host is within eClub.

    1. The applications deploy and/or started

    2. An eleague-admin (admin1) resets all eLeague tables (using the LeagueTestUtilEJB)

    3. An eleague-admin (admin1) populates the eLeague tables (using the LeagueIngestor)

    4. An eclub-admin (admin1) resets the eClub tables (using the ClubTestUtilEJB)

    5. An eclub-admin (admin1) populates the eClub tables (using the ClubTestUtilEJB) if anything necessary.

    6. The league coordinator(lmtucker) creates a Club in eLeague (using the LeagueMgmtEJB). League coordinator assigns the club representative (whoever you call them) to have the login of "user2" to match a login pre-defined in your Wildfly Server. This login has multiple roles assigned spanning both applications.

    7. The eleague-clubcoord (user2) adds Venue for Club in eLeague (using ClubMgmtEJB). The "user2" login has been pre-defined to have the role "eclub-coord".

    8. An eclub-member (user3) creates Parent in eClub (using MemberMgmtEJB). "user3" is a login pre-defined in your Wildfly Server with the role "eclub-member".

    9. An eclub-member (user3) creates Player in eClub (using MemberMgmtEJB) for their child

    10. An eclub-member (user3) adds a Coach role in eClub (using MemberMgmtEJB) to their identity

    11. The eclub-coord (user2) creates a Team in eClub (using OrgMgmtEJB)

    12. The eclub-coord(user2) assigns Players to a Team in eClub (using OrgMgmtEJB)

    13. The eclub-coord(user2) assigns Coach to a Team in eClub (using OrgMgmtEJB)

    14. The eclub-coord(user2) assigns Manager to a Team in eClub (using OrgMgmtEJB)

    15. An eclub-member(user3) views their team roster in eClub (using OrgMgmtEJB)

    16. An eleague-clubcoord (user2) adds a Team for Club in eLeague (using ClubMgmtEJB)

    17. An eleague-clubcoord (user2) adds a contact for a Team eLeague (using ClubMgmtEJB)

    18. An eleague-clubcoord (user2) assigns a Team to an existing Division eLeague (using ClubMgmtEJB; division=U13-A, refid="Division-845")

    19. The eleague-coord (lmtucker) schedules a Season eLeague (using ContestMgmtEJB)

    20. eLeague (eleague-sys) (thru ContestMgmtEJB) publishes schedule events to Schedule Topic

    21. eClub (eclub-sys) (using LeagueListenerMDB) receives messages related to unfinished contests. It obtains the e-mail addresses for members associated with the team referenced in the message. It logs the message and e-mail addresses.

    22. anonymous users views Team Schedule in eClub (using OrgMgmtEJB). eClub (eclub-sys) contacts eLeague (using LeagueMgmtEJB) for team season associated with eClub's team.

    23. EJB Timer fires a callback in eLeague (using ContestMgmtEJB (eleague-sys))

    24. eLeague (eleague-sys) (using ContestMgmtEJB) publishes reminder messages to the Schedule Topic (and received in eClub using LeagueListenerMDB).

    25. The eleague-coord (jtflynn) (for division=U13-A, refid="Division-845") reports a Score in eLeague involving our club team (using ContestMgmtEJB)

    26. anonymous user views Division Standings in eLeague (using LeagueMgmtEJB)

Figure 28.1. eSport Full Sequence

eSport Full Sequence