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

Scottx611x/acceptance testing #1534

Merged
merged 164 commits into from
Feb 28, 2017
Merged

Conversation

scottx611x
Copy link
Member

@scottx611x scottx611x commented Nov 17, 2016

Introduce StaticLiveServerTestCases and factory_boy object creation as a solid foundation for writing more acceptance tests

Refactor older tests that interact with the ORM to inherit from TransactionTestCase to ensure a clean db after each test run, and to move away from the use of large tearDown() methods.

obj.save()
for ontology in ontologies:
try:
with transaction.atomic():
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do DataMigrations already utilize transactions???

@@ -757,11 +755,11 @@ def get_pre_isa_archive(self):
data_set__uuid=self.uuid).investigation.pre_isarchive_file)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split nested lookup into 2 trys

analysis_uuid = uuid_builtin.uuid4()
AnalysisFactory(
uuid=analysis_uuid,
name="Test Analysis - {}".format(analysis_uuid),
project=project,
data_set=dataset,
workflow=workflow,
status=status_choices[analysis_status_counter][0]
status=random.choice(status_choices)[0]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check if status field is needed (random is bad)

for obj in objects:
obj.save()

for file_extension in file_extensions:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above for Ontologies

# Manually create and save public group to sync Selenium and test
# threads
# Manually create and save public group to sync Selenium and gecko
# driver threads
create_public_group()
ExtendedGroup.objects.public_group().save()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ONe of these lines is not necessary (probably create_public_group() )

@scottx611x
Copy link
Member Author

@scottx611x scottx611x merged commit 42469a4 into develop Feb 28, 2017
@scottx611x scottx611x deleted the scottx611x/acceptance_testing branch February 28, 2017 19:02
mccalluc added a commit that referenced this pull request Oct 20, 2017
…from settings.base), but continue to use prod for rest of tests (as has been the case since #1534).
mccalluc added a commit that referenced this pull request Oct 20, 2017
* Fresh install of cypress

* cypress default config

* Test homepage

* Test statistics and about

* Travis ready to go?

* Travis ready to go?

* Try explore and list, but they do not work

* Add runserver

* Wait for server to start

* Util function in tests / hit right url on travis

* Remove selenium from travis.yml

* Remove all references to selenium

* collectstatic

* Test explore and list

* noinput

* start registration

* mkdir static

* Move grunt up so ui/production is available

* Try adding --insecure so it will serve static?

* mkdir not needed now that grunt comes first?

* Travis is running test, but getting stuck trying to send email

* These two failed on travis

* Account approval and login are tested

* Util functions done right

* shell_plus > shell

* Start testing profile page

* Try to record cypress runs in travis

* Different IP between dev and travis causing problems

* cypress --record

* Activate guest user

* Load and add to public group

* Add line to README

* Empty stub tests

* Change order in travis

* visible_btn util function; link to dashboard

* Fixtures. Make "visible" more flexible.

* Test sorting and locking

* And check that buttons toggle

* data sets list test

* TODO note

* Add params to python utils so we can create a slugged dataset

* This will fail on Travis, but is prereq for work with Scott tomorrow

* Temporarily disable

* Start preview test

* test preview... but IDs are wrong?

* preview spec with stronger assertions

* fix typo

* Move to before_script

* Remove from readme; move to wiki

* Replace hardcoded url with human-readable note

* Flake8 is complaining now: not sure why it was not a problem earlier

* delete the new user we created

* Clean up DataSets

* Split up grunt, and hopefully this is sufficient for Travis

* Bring back all the selenium code

* These cases are now covered by cypress

* TODOs: Replace with cypress, eventually

* selenium puppet

* slug=None not needed in factory

* Reenable production email. Expecting tests to run, up til the point where the cypress test wants to email

* Make selenium_testing a module again

* Run in dev mode on travis, so that puppet will use console for email, instead of smtp. hopefully.

* New prod_except_email settings

* tweak prod settings only when running server, as suggested by scott

* On travis, runserver with dev settings (so we will get console email from settings.base), but continue to use prod for rest of tests (as has been the case since #1534).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants