Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Wish List #26

Open
16 of 34 tasks
bengolder opened this issue Mar 5, 2016 · 0 comments
Open
16 of 34 tasks

Test Wish List #26

bengolder opened this issue Mar 5, 2016 · 0 comments

Comments

@bengolder
Copy link
Contributor

Integration tests
Tests that ensure that the code can perform tasks when the different pieces are used in concert. These may touch the file system and may use a test database.

  • Test that a GET request to the root URL returns a demo index page
  • Test that we can POST a sample pdf
    • make sure that it returns the right field types and field names
    • make sure the url is correct
    • make sure that it properly reports any errors or problems with invalid pdfs
      • make sure it warns about unsupported field types
      • make sure it gives a warning if it cannot find any fields
      • make sure it is not encrypted or locked
      • make sure it properly reports any pdftk errors
      • make sure it gives you actionable information to fix the errors or warnings
    • make sure the pdf's data is properly stored in the database
    • make sure it can handle all the supported field types
    • make sure any temporary files are deleted
    • make sure we get an fdf that we would expect
    • make sure we get an fdf mapping that we would expect
    • make sure we can post a pdf that is written in unicode, such as Chinese, Japanese, Korean characters
  • Test that we can submit data to fill a pdf
    • make sure it returns a pdf that's filled as we would expect (compare against an existing filled test file)
    • make sure the fdf and filled fdf are what we would expect
    • make sure that all temp files are removed and no data is stored in the database
    • report errors for what pdftk cannot accept
    • make sure if you submit fields that aren't in the pdf, that it will error
    • make sure it supports unicode submissions

Unit tests
Tests that do not rely on file system or the db, and which only run isolated units of code. They should generally run very quickly. Mock and patch are extremely helpful for writing these.

  • Test that each of the field types can be properly filled
  • Test regex matching for each field type
  • Test pdftk wrapping functions, without touching filesystem
  • Test filling an fdf with unicode text
  • Test reading in a pdf with unicode text in fields

Other Functional or Manual Tests

  • install and use it in another Flask project
  • install and use it in an existing Django project
  • deploy it on Heroku
  • deploy it on AWS
  • deploy it on Azure
  • deploy it on Cloud.gov
This was referenced Mar 6, 2016
@bengolder bengolder changed the title Brainstorm the necessary test cases Test Wish List Mar 7, 2016
@bengolder bengolder mentioned this issue Mar 7, 2016
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
@bengolder and others